@layer reset, base, components, utilities;

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  html {
    -webkit-text-size-adjust: 100%;
  }
  img, picture, svg {
    display: block;
    max-width: 100%;
  }
  button, input, textarea, select {
    font: inherit;
    color: inherit;
  }
  ul, ol {
    list-style: none;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  table {
    border-collapse: collapse;
  }
}

@layer base {
  @font-face {
    font-family: "Playfair Display";
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
    src: url("../fonts/playfair-display-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
  }

  @font-face {
    font-family: "Playfair Display";
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
    src: url("../fonts/playfair-display-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0;
  }

  @font-face {
    font-family: "Golos Text";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/golos-text-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
  }

  @font-face {
    font-family: "Golos Text";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/golos-text-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0;
  }

  :root {
    --ink: #1f1f1f;
    --graphite: #666666;
    --graphite-soft: #8a8a8a;
    --graphite-line: #d9d9d9;
    --navy: #003366;
    --navy-deep: #001f3f;
    --lime: #99cc33;
    --lime-deep: #82b224;
    --lime-text: #4f7516;
    --paper: #ffffff;
    --paper-soft: #fafafa;
    --paper-line: #e4e4e4;
    --font-head: "Playfair Display", Georgia, serif;
    --font-body: "Golos Text", Arial, sans-serif;
    --container: 1240px;
    --gutter: clamp(1.25rem, 4vw, 3rem);
  }

  html {
    font-size: 100%;
    scroll-behavior: smooth;
  }

  body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--graphite);
    background: var(--paper);
  }

  h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.12;
    font-weight: 700;
  }

  h1 {
    font-size: clamp(2.75rem, 5.6vw + 1rem, 6.2rem);
    letter-spacing: -0.01em;
  }

  h2 {
    font-size: clamp(2.1rem, 3.6vw + 0.6rem, 3.6rem);
    letter-spacing: -0.008em;
  }

  h3 {
    font-size: clamp(1.375rem, 1.6vw + 0.6rem, 1.9rem);
  }

  p {
    max-width: 62ch;
  }

  strong {
    color: var(--ink);
    font-weight: 600;
  }

  :focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .jump-to-main {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 200;
    background: var(--navy);
    color: #fff;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    transition: top 0.18s ease;
  }

  .jump-to-main:focus {
    top: 1rem;
  }

  @media (prefers-reduced-motion: reduce) {
    .jump-to-main {
      transition: none;
    }
    html {
      scroll-behavior: auto;
    }
  }
}

@layer components {
  .wrap {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  /* header */
  .pagehead {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--paper-line);
    backdrop-filter: none;
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
  }

  .logotype {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--ink);
  }

  .logotype span {
    color: var(--lime-text);
  }

  .nav-primary {
    display: none;
  }

  .nav-primary ul {
    display: flex;
    gap: 2rem;
    align-items: center;
  }

  .nav-primary a {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 600;
    color: var(--graphite);
    padding-block: 0.35rem;
    border-bottom: 2px solid transparent;
  }

  .nav-primary a:hover,
  .nav-primary a[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--lime);
  }

  .nav-primary .btn {
    color: #fff;
  }

  .burger {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--graphite-line);
  }

  .burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
  }

  .burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* mobile full-screen menu, sits after </header> in the DOM */
  .menu-full {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: var(--navy);
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: var(--gutter);
  }

  .menu-full.is-open {
    display: flex;
  }

  .menu-full ul {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
  }

  .menu-full a {
    font-family: var(--font-head);
    font-size: 2.1rem;
    color: #fff;
  }

  .menu-full .menu-close {
    position: absolute;
    top: 1.4rem;
    right: var(--gutter);
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 1.4rem;
  }

  .menu-full .menu-contact {
    margin-top: 2.4rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
  }

  .menu-full .menu-contact a {
    color: var(--lime);
  }

  /* buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.8rem;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    min-height: 48px;
  }

  .btn-primary {
    background: var(--navy);
    color: #fff;
  }

  .btn-primary:hover {
    background: var(--navy-deep);
  }

  .btn-accent {
    background: var(--lime);
    color: var(--ink);
  }

  .btn-accent:hover {
    background: var(--lime-deep);
  }

  .btn-ghost {
    background: transparent;
    border-color: var(--graphite-line);
    color: var(--ink);
  }

  .btn-ghost:hover {
    border-color: var(--ink);
  }

  /* footer */
  .pagefoot {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.82);
    padding-block: clamp(3rem, 6vw, 5rem) 2rem;
  }

  .foot-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
  }

  .foot-brand {
    font-family: var(--font-head);
    color: #fff;
    font-size: 1.5rem;
  }

  .foot-brand span {
    color: var(--lime);
  }

  .foot-col h4 {
    font-family: var(--font-body);
    color: #fff;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.09em;
    margin-bottom: 0.9rem;
  }

  .foot-col ul {
    display: grid;
    gap: 0.55rem;
    font-size: 0.94rem;
  }

  .foot-col a:hover {
    color: var(--lime);
  }

  .foot-bottom {
    margin-top: 2.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.6rem;
    justify-content: space-between;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
  }

  .foot-bottom a:hover {
    color: var(--lime);
  }

  /* cookie bar */
  .cc-pill {
    position: fixed;
    left: 0.9rem;
    bottom: 0.9rem;
    z-index: 150;
    max-width: 340px;
    background: var(--ink);
    color: #f2f2f2;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    display: none;
  }

  .cc-pill.is-visible {
    display: block;
  }

  .cc-pill p {
    font-size: 0.78rem;
    line-height: 1.4;
    max-width: none;
    margin-bottom: 0.6rem;
  }

  .cc-pill a {
    color: var(--lime);
    text-decoration: underline;
  }

  .cc-actions {
    display: flex;
    gap: 0.6rem;
  }

  .cc-actions button {
    flex: 1;
    padding: 0.45rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #fff;
  }

  .cc-actions .cc-accept {
    background: var(--lime);
    color: var(--ink);
    border-color: var(--lime);
  }
}

@media (min-width: 768px) {
  @layer components {
    .foot-grid {
      grid-template-columns: 1.4fr 1fr 1fr 1fr;
    }
  }
}

@media (min-width: 980px) {
  @layer components {
    .nav-primary {
      display: block;
    }
    .burger {
      display: none;
    }
  }
}
