/* Oyfon landing — monochrome, modern CSS (nesting, custom props, clamp, grid) */

:root {
  --bg: #fff;
  --fg: #111;
  --muted: #6b6b6b;
  --line: #e5e5e5;
  --surface: #f6f6f6;
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1080px;
  --pad: clamp(1rem, 4vw, 2rem);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

.l-container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Header */

.l-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);

  & .l-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
  }
}

.l-logo { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }

.l-lang {
  display: flex;
  gap: 0.25rem;

  & button {
    border: none;
    background: none;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;

    &:hover { background: var(--surface); }
    &.active { color: var(--fg); font-weight: 600; }
  }
}

/* Hero */

.l-hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 4rem);
  text-align: center;

  & h1 {
    margin: 0 auto;
    max-width: 14ch;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
  }

  & p {
    margin: 1rem auto 0;
    max-width: 38ch;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted);
  }
}

.l-hero-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.l-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--fg);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;

  &.solid {
    background: var(--fg);
    color: var(--bg);

    &:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgb(0 0 0 / 0.18); }
  }

  &.outline {
    background: transparent;
    color: var(--fg);

    &:hover { background: var(--surface); }
  }
}

/* App Store badge */

.l-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.4rem 0.6rem 1.1rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;

  &:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgb(0 0 0 / 0.18); }

  & svg { width: 26px; height: 26px; flex-shrink: 0; }

  & .l-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;

    & small { font-size: 0.7rem; font-weight: 400; opacity: 0.85; }
    & strong { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
  }
}

/* Sections */

.l-section {
  padding-block: clamp(2.5rem, 6vw, 5rem);

  & > .l-container > h2 {
    margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
  }
}

.l-section.alt { background: var(--surface); }

/* Phones grid */

.l-phones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.l-phone-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  &:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgb(0 0 0 / 0.10); }

  & img {
    margin-inline: auto;
    height: 220px;
    object-fit: contain;
  }

  & .name { margin-top: 1rem; font-weight: 700; font-size: 1.1rem; }
  & .price { margin-top: 0.25rem; color: var(--muted); font-size: 0.95rem; }
  & .monthly { margin-top: 0.5rem; font-weight: 600; }
}

/* Calculator */

.l-calc {
  max-width: 560px;
  margin-inline: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
  display: grid;
  gap: 1.25rem;
}

.l-field {
  display: grid;
  gap: 0.4rem;

  & label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }

  & select {
    width: 100%;
    padding: 0.7rem 2.4rem 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  }
}

.l-months {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;

  & button {
    flex: 1;
    min-width: 56px;
    padding: 0.6rem 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.15s, background 0.15s;

    &:hover { border-color: var(--fg); }
    &.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
  }
}

.l-calc-result {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  display: grid;
  gap: 0.5rem;

  & .row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;

    & .label { color: var(--muted); font-size: 0.95rem; }
    & .value { font-weight: 700; }
    & .value.big { font-size: clamp(1.4rem, 3vw, 1.8rem); }
  }

  & .note { color: var(--muted); font-size: 0.8rem; }
}

/* Features */

.l-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.l-feature {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;

  & .icon svg { width: 28px; height: 28px; stroke: var(--fg); }
  & .title { margin-top: 0.75rem; font-weight: 700; }
  & .desc { margin-top: 0.25rem; color: var(--muted); font-size: 0.95rem; }
}

/* Download band */

.l-band {
  text-align: center;

  & h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  & p { margin: 0.75rem auto 0; max-width: 40ch; color: var(--muted); }
  & .l-hero-cta { margin-top: 1.5rem; }
}

/* Footer */

.l-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;

  & .l-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
  }

  & nav { display: flex; gap: 1.25rem; }
  & a:hover { color: var(--fg); }
}

/* Product page */

.l-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-block: clamp(1.5rem, 4vw, 3rem);

  @media (max-width: 720px) { grid-template-columns: 1fr; }

  & .l-product-img {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;

    & img { margin-inline: auto; max-height: 420px; object-fit: contain; }
  }

  & h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  & .l-price { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 700; }
}

.l-product-form { display: grid; gap: 1.25rem; }

.l-crumb {
  padding-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);

  & a:hover { color: var(--fg); }
}

.l-stock {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--line);

  &.in { background: var(--fg); color: var(--bg); border-color: var(--fg); }
  &.out { color: var(--muted); }
}

/* Prose (legal pages) */

.l-prose {
  max-width: 680px;
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 3.5rem);

  & h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  & .updated { margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; }

  & h2 {
    margin: 2rem 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
  }

  & p { margin: 0.5rem 0; color: #333; }

  & a { text-decoration: underline; text-underline-offset: 3px; }
}

/* Reveal on scroll */

.reveal {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 0.6s ease, translate 0.6s ease;

  &.in { opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
  .l-btn, .l-phone-card, .l-badge { transition: none; }
}
