@layer base, components, utilities;

@layer base {
  :root {
    --color-primary: #082119;
    --color-secondary: #d1d5db;
    --color-accent: #d4af37;
    --color-bg: #fdfeff;
    --color-ink: #0a0f0c;
    --color-muted: rgba(10, 15, 12, 0.65);

    --font-main: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji",
      "Segoe UI Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    --radius: 14px;
    --shadow: 0 16px 50px rgba(8, 33, 25, 0.12);
    --spacing: 24px;

    --container: 1120px;
    --line: rgba(8, 33, 25, 0.12);
    --panel: rgba(253, 254, 255, 0.78);
    --panel-solid: #ffffff;
  }

  * {
    box-sizing: border-box;
  }

  html {
    color-scheme: light;
    overflow-x: hidden;
    scroll-behavior: smooth;
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
  }

  body {
    margin: 0;
    font-family: var(--font-main);
    overflow-x: hidden;
    color: var(--color-ink);
    background: radial-gradient(1200px 800px at 15% 10%, rgba(212, 175, 55, 0.08), transparent 65%),
      radial-gradient(900px 600px at 90% 35%, rgba(8, 33, 25, 0.07), transparent 60%), var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  a {
    color: inherit;
    text-decoration-color: rgba(212, 175, 55, 0.6);
    text-underline-offset: 3px;
  }

  a:hover {
    text-decoration-color: var(--color-accent);
  }

  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  button,
  input,
  textarea {
    font: inherit;
    color: inherit;
  }

  :focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.65);
    outline-offset: 2px;
  }

  .skip-link {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-160%);
    transition: transform 180ms ease;
    z-index: 9999;
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .container {
    width: min(var(--container), calc(100% - 32px));
    margin-inline: auto;
  }

  .site-main {
    flex: 1;
  }
}

@layer components {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(14px);
    background: linear-gradient(to bottom, rgba(253, 254, 255, 0.9), rgba(253, 254, 255, 0.6));
    border-bottom: 1px solid var(--line);
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
  }

  .brand-text {
    font-weight: 650;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52vw;
  }

  .nav-desktop {
    display: none;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
  }

  .nav-desktop a {
    font-size: 14px;
    text-decoration: none;
    color: rgba(10, 15, 12, 0.78);
    padding: 8px 10px;
    border-radius: 999px;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
  }

  .nav-desktop a:hover {
    background: rgba(212, 175, 55, 0.12);
    color: rgba(10, 15, 12, 0.92);
    transform: translateY(-1px);
  }

  .burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 6px 22px rgba(8, 33, 25, 0.08);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
  }

  .burger:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.85);
  }

  .burger-lines {
    width: 18px;
    height: 12px;
    position: relative;
  }

  .burger-lines::before,
  .burger-lines::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: rgba(8, 33, 25, 0.88);
    transform-origin: center;
    transition: transform 220ms ease, top 220ms ease, opacity 220ms ease;
  }

  .burger-lines::before {
    top: 0;
  }

  .burger-lines::after {
    top: 10px;
  }

  .burger[aria-expanded="true"] .burger-lines::before {
    top: 5px;
    transform: rotate(45deg);
  }

  .burger[aria-expanded="true"] .burger-lines::after {
    top: 5px;
    transform: rotate(-45deg);
  }

  @media (min-width: 1024px) {
    .header-inner {
      grid-template-columns: 1fr auto;
    }
    .nav-desktop {
      display: inline-flex;
    }
    .burger {
      display: none;
    }
  }
  
  .nav-panel {
    width: min(520px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    border-radius: calc(var(--radius) + 8px);
    background: rgba(253, 254, 255, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: var(--shadow);
    transform: translateY(10px) scale(0.98);
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
  }

  .nav-overlay[data-open="true"] .nav-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .nav-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--line);
  }

  .nav-title {
    font-family: var(--font-mono);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 12px;
    color: rgba(10, 15, 12, 0.7);
  }

  .icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: transform 160ms ease;
  }

  .icon-btn:hover {
    transform: translateY(-1px);
  }

  .nav-mobile {
    display: grid;
    gap: 10px;
    padding: 14px;
  }

  .nav-mobile a {
    text-decoration: none;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(8, 33, 25, 0.08);
    background: rgba(255, 255, 255, 0.55);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  }

  .nav-mobile a:hover {
    transform: translateX(2px);
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.07);
  }

  .section {
    padding: clamp(44px, 7vw, 92px) 0;
  }

  .hero {
    padding-top: clamp(44px, 7vw, 86px);
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: -2px 0 auto 0;
    height: 420px;
    background: radial-gradient(700px 420px at 50% 20%, rgba(8, 33, 25, 0.08), transparent 60%),
      radial-gradient(520px 340px at 30% 10%, rgba(212, 175, 55, 0.14), transparent 58%),
      repeating-linear-gradient(
        90deg,
        rgba(8, 33, 25, 0.03) 0px,
        rgba(8, 33, 25, 0.03) 1px,
        transparent 1px,
        transparent 8px
      );
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 0;
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.14) 50%, transparent 100%);
    width: 240px;
    transform: translateX(-320px);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
    animation: scanline 7.5s linear infinite;
  }

  .hero .container {
    position: relative;
    z-index: 1;
  }

  @keyframes scanline {
    0% {
      transform: translateX(-320px);
    }
    100% {
      transform: translateX(calc(100vw + 320px));
    }
  }

  .section-head {
    text-align: center;
    margin: 0 auto clamp(22px, 3.2vw, 34px);
    max-width: 820px;
  }

  .kicker {
    margin: 0 0 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(10, 15, 12, 0.68);
  }

  h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.02em;
    line-height: 1.06;
    color: var(--color-primary);
  }

  h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 3.2vw, 36px);
    letter-spacing: -0.015em;
    line-height: 1.12;
    color: var(--color-primary);
  }

  h3 {
    margin: 0 0 10px;
    font-size: 18px;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: rgba(8, 33, 25, 0.92);
  }

  p {
    margin: 0 0 12px;
    line-height: 1.6;
  }

  .lead {
    margin: 0 auto;
    color: var(--color-muted);
    font-size: 16px;
    max-width: 70ch;
  }

  .fineprint {
    font-size: 13px;
    color: rgba(10, 15, 12, 0.62);
  }

  .floating-slate {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.62));
    border: 1px solid rgba(8, 33, 25, 0.12);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 18px 64px rgba(8, 33, 25, 0.1);
  }

  .card {
    padding: clamp(16px, 3vw, 22px);
    position: relative;
    overflow: hidden;
  }

  .card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 0.25px solid rgba(212, 175, 55, 0);
    pointer-events: none;
    transition: border-color 180ms ease;
  }

  .card:hover::after,
  .hero-card:hover::after,
  .cookie-inner:hover::after,
  .cookie-settings-panel:hover::after {
    border-color: rgba(212, 175, 55, 0.7);
  }

  .grid-2,
  .grid-3 {
    display: grid;
    gap: clamp(14px, 2.2vw, 18px);
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  @media (min-width: 820px) {
    .grid-2 {
      grid-template-columns: 1fr 1fr;
    }
    .grid-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(14px, 2.2vw, 18px);
    align-items: stretch;
  }

  @media (min-width: 940px) {
    .hero-grid {
      grid-template-columns: 1.05fr 0.95fr;
      align-items: start;
    }
  }

  .hero-card {
    padding: clamp(16px, 3vw, 22px);
    position: relative;
    overflow: hidden;
  }

  .rating-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  .stars {
    letter-spacing: 0.12em;
    color: var(--color-accent);
    font-size: 14px;
  }

  .rating-text {
    color: rgba(10, 15, 12, 0.7);
    font-size: 14px;
  }

  .trust-badge {
    margin: 0 auto 16px;
    width: fit-content;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.08);
    color: rgba(8, 33, 25, 0.86);
    font-size: 13px;
  }

  .price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
  }

  .price {
    font-size: 30px;
    font-weight: 720;
    letter-spacing: -0.02em;
    color: var(--color-primary);
  }

  .price-old {
    font-size: 14px;
    color: rgba(10, 15, 12, 0.55);
    text-decoration: line-through;
  }

  .order-form {
    display: grid;
    gap: 12px;
    text-align: left;
  }

  .field label {
    display: block;
    font-size: 13px;
    color: rgba(10, 15, 12, 0.7);
    margin-bottom: 6px;
  }

  .field input,
  .field textarea {
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(8, 33, 25, 0.14);
    background: rgba(255, 255, 255, 0.7);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  }

  .field input:focus,
  .field textarea:focus {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.16);
  }

  .field input[data-invalid="true"],
  .field textarea[data-invalid="true"] {
    border-color: rgba(180, 30, 30, 0.55);
    box-shadow: 0 0 0 4px rgba(180, 30, 30, 0.12);
  }

  .field-inline {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 10px;
  }

  .field-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
  }

  .field-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: rgba(10, 15, 12, 0.55);
  }

  .field-error {
    margin: 6px 0 0;
    font-size: 12px;
    color: rgba(180, 30, 30, 0.86);
    min-height: 1.1em;
  }

  .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(8, 33, 25, 0.16);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    will-change: transform;
  }

  .btn:hover {
    transform: translate3d(var(--mx, 0px), var(--my, -1px), 0);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 18px 44px rgba(8, 33, 25, 0.12);
  }

  .btn.primary {
    border-color: rgba(212, 175, 55, 0.55);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.1));
    color: rgba(8, 33, 25, 0.92);
    font-weight: 650;
  }

  .microcopy {
    margin: 0;
    font-size: 12px;
    color: rgba(10, 15, 12, 0.58);
    text-align: center;
  }

  .hero-figure {
    margin: 0;
    position: relative;
    border-radius: calc(var(--radius) + 10px);
    overflow: hidden;
    border: 1px solid rgba(8, 33, 25, 0.12);
    background: rgba(255, 255, 255, 0.65);
    min-height: 420px;
    display: grid;
    align-content: center;
  }

  .image-underlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 440px at 50% 20%, rgba(212, 175, 55, 0.18), transparent 62%),
      linear-gradient(180deg, rgba(8, 33, 25, 0.08), transparent 45%, rgba(8, 33, 25, 0.04));
    z-index: 0;
  }

  .hero-figure img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    object-fit: cover;
    filter: saturate(1.03) contrast(1.02);
    transition: transform 260ms ease, filter 260ms ease;
  }

  .hero-figure:hover img {
    transform: scale(1.02);
    filter: saturate(1.08) contrast(1.06);
  }

  .figure-caption {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 12px 14px;
    border-top: 1px solid rgba(8, 33, 25, 0.12);
    font-size: 12px;
    color: rgba(10, 15, 12, 0.58);
    background: rgba(253, 254, 255, 0.78);
  }

  .list {
    margin: 0;
    padding-left: 18px;
    color: rgba(10, 15, 12, 0.76);
    line-height: 1.7;
  }

  .metrics {
    display: grid;
    gap: 10px;
    margin-top: 10px;
  }

  .metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(8, 33, 25, 0.1);
    background: rgba(255, 255, 255, 0.55);
  }

  .metric-label {
    font-size: 13px;
    color: rgba(10, 15, 12, 0.72);
  }

  .metric-value {
    font-family: var(--font-mono);
    font-weight: 650;
    color: rgba(8, 33, 25, 0.92);
  }

  .metric-unit {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(10, 15, 12, 0.6);
    margin-left: 6px;
  }

  .accordion {
    display: grid;
    gap: 10px;
  }

  .accordion-btn {
    width: 100%;
    text-align: left;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(8, 33, 25, 0.12);
    background: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  }

  .accordion-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(212, 175, 55, 0.45);
    background: rgba(212, 175, 55, 0.07);
  }

  .accordion-panel {
    padding: 0 12px 10px;
    color: rgba(10, 15, 12, 0.74);
  }

  .map-frame {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(8, 33, 25, 0.12);
    background: rgba(255, 255, 255, 0.55);
    height: 280px;
  }

  .map-frame iframe {
    border: 0;
    width: 100%;
    height: 100%;
  }

  .site-footer {
    border-top: 1px solid var(--line);
    background: rgba(253, 254, 255, 0.78);
    backdrop-filter: blur(12px);
    margin-top: auto;
  }

  .footer-inner {
    display: grid;
    gap: 18px;
    padding: 20px 0;
    align-items: start;
  }

  .footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }

  .footer-links a {
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(8, 33, 25, 0.1);
    background: rgba(255, 255, 255, 0.55);
  }

  .footer-links a:hover {
    border-color: rgba(212, 175, 55, 0.45);
    background: rgba(212, 175, 55, 0.07);
  }

  .copyright {
    margin: 0;
    color: rgba(10, 15, 12, 0.62);
    font-size: 13px;
  }

  @media (min-width: 820px) {
    .footer-inner {
      grid-template-columns: 1.2fr 1fr auto;
      align-items: center;
    }
    .footer-links {
      justify-content: center;
    }
    .copyright {
      text-align: right;
    }
  }

  .cookie-banner {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    padding: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(to top, rgba(8, 33, 25, 0.22), transparent);
  }

  .cookie-inner {
    width: min(980px, 100%);
    padding: 14px;
    position: relative;
    overflow: hidden;
  }

  .cookie-title {
    margin: 0 0 8px;
    font-weight: 680;
    letter-spacing: -0.01em;
    color: rgba(8, 33, 25, 0.92);
  }

  .cookie-text {
    margin: 0 0 12px;
    color: rgba(10, 15, 12, 0.7);
  }

  .cookie-actions {
    display: grid;
    gap: 10px;
  }

  @media (min-width: 640px) {
    .cookie-actions {
      grid-template-columns: auto auto 1fr;
      align-items: center;
    }
    .cookie-actions .primary {
      justify-self: end;
    }
  }

  .cookie-settings {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: rgba(8, 33, 25, 0.45);
    display: grid;
    place-items: center;
    padding: 18px;
  }

  .cookie-settings-panel {
    width: min(640px, 100%);
    padding: 14px;
    border-radius: calc(var(--radius) + 8px);
    background: rgba(253, 254, 255, 0.92);
    border: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: var(--shadow);
  }

  .cookie-settings-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .cookie-toggles {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
  }

  .toggle-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 12px;
    border-radius: 16px;
    border: 1px solid rgba(8, 33, 25, 0.12);
    background: rgba(255, 255, 255, 0.6);
  }

  .toggle-label {
    font-weight: 650;
  }

  .toggle-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(10, 15, 12, 0.6);
  }

  .pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(8, 33, 25, 0.08);
    border: 1px solid rgba(8, 33, 25, 0.1);
    font-size: 12px;
    color: rgba(8, 33, 25, 0.82);
    font-family: var(--font-mono);
  }
}

@layer utilities {
  [data-reveal] {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
    transition: opacity 520ms ease, transform 520ms ease;
  }

  [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  @media (prefers-reduced-motion: reduce) {
    [data-reveal] {
      opacity: 1;
      transform: none;
      transition: none;
    }
    .hero::after {
      animation: none;
      opacity: 0;
    }
    .btn:hover,
    .burger:hover,
    .accordion-btn:hover,
    .nav-desktop a:hover,
    .nav-mobile a:hover,
    .icon-btn:hover {
      transform: none;
    }
  }
}
