/* ================================================================
   LAYOUT — Page sections with co-located responsive styles
================================================================ */

@layer layout {

  /* ================================================================
     NAV
  ================================================================ */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    height: 68px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(245, 240, 232, .84);
    backdrop-filter: blur(22px) saturate(1.6);
    border-bottom: 1px solid var(--line);
    transition: background .35s, box-shadow .35s;

    &.stuck {
      background: rgba(245, 240, 232, .97);
      box-shadow: 0 2px 22px rgba(28, 18, 4, .07);
    }

    @media (max-width: 900px) { padding: 0 28px; }
    @media (max-width: 640px) { padding: 0 20px; }
  }

  .nav-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 400;
    color: var(--t-head);
    letter-spacing: .01em;
    flex-shrink: 0;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 36px;

    & a {
      font-size: 12px;
      letter-spacing: .06em;
      text-transform: uppercase;
      color: var(--t-muted);
      font-weight: 400;
      transition: color .2s;
      position: relative;
      min-height: 44px;
      display: inline-flex;
      align-items: center;

      &:hover,
      &.active {
        color: var(--t-head);
      }

      &.active::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--gold);
      }
    }

    @media (max-width: 900px) { display: none; }
  }

  .nav-end {
    display: flex;
    align-items: center;
    gap: 14px;

    & .btn {
      @media (max-width: 900px) { display: none; }
    }
  }

  /* ── Hamburger ─────────────────────────────────────────────── */
  .ham {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px;  /* WCAG 2.2 target size */
    height: 44px;
    padding: 10px 6px;
    background: none;
    border: none;
    cursor: none;
    align-items: center;
    justify-content: center;

    & span {
      display: block;
      height: 1.5px;
      background: var(--t-head);
      transition: transform .3s var(--ease), opacity .3s, width .3s;
      transform-origin: center;

      &:nth-child(1) { width: 100%; }
      &:nth-child(2) { width: 65%; }
      &:nth-child(3) { width: 100%; }
    }

    &.open span {
      &:nth-child(1) { transform: translateY(6.5px) rotate(45deg); width: 100%; }
      &:nth-child(2) { opacity: 0; }
      &:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
    }

    @media (max-width: 900px) { display: flex; }
  }

  /* ── Mobile Nav Panel ──────────────────────────────────────── */
  .mob-nav {
    position: fixed;
    top: 68px;
    inset: 68px 0 0;
    background: rgba(245, 240, 232, .97);
    backdrop-filter: blur(22px);
    z-index: 490;
    padding: 44px 36px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    border-top: 1px solid var(--line);
    overflow-y: auto;

    &.open { transform: none; }

    & a {
      font-family: var(--serif);
      font-size: 30px;
      font-weight: 300;
      color: var(--t-head);
      padding: 11px 0;
      min-height: 44px;
      border-bottom: 1px solid var(--line);
      transition: color .2s, padding-left .25s var(--ease);

      &:hover {
        color: var(--gold);
        padding-left: 10px;
      }

      &:last-child { border-bottom: none; }
    }

    @media (max-width: 640px) { padding: 36px 22px; }
  }

  /* ================================================================
     HERO
  ================================================================ */
  .hero {
    min-height: 100svh;
    padding-top: 68px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--bg);
  }

  .hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(90px);
  }

  .hero-orb-1 {
    width: 700px;
    height: 700px;
    top: -180px;
    right: -100px;
    background: radial-gradient(circle, rgba(170, 130, 48, .10) 0%, transparent 70%);
  }

  .hero-orb-2 {
    width: 420px;
    height: 420px;
    bottom: 40px;
    left: 40px;
    background: radial-gradient(circle, rgba(200, 160, 80, .06) 0%, transparent 70%);
  }

  .hero-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;

    & svg { width: 100%; height: 100%; opacity: .35; }
  }

  .hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 40px;

    @media (max-width: 900px) {
      grid-template-columns: 1fr;
      gap: 44px;
      padding: 0 28px;
    }
  }

  .hero-tag { margin-bottom: 22px; }

  .hero-h1 {
    font-family: var(--serif);
    font-size: clamp(44px, 5.2vw, 76px);
    font-weight: 300;
    line-height: 1.02;
    letter-spacing: -.022em;
    color: var(--t-head);
    margin-bottom: 22px;

    & em {
      font-style: italic;
      color: var(--gold);
      display: block;
    }
  }

  .hero-sub {
    font-size: 15.5px;
    color: var(--t-body);
    line-height: 1.82;
    max-width: 460px;
    margin-bottom: 38px;
  }

  .hero-actions {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
  }

  .hero-right {
    display: flex;
    flex-direction: column;
    gap: 14px;

    @media (max-width: 900px) {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

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

  /* ================================================================
     TICKER
  ================================================================ */
  .ticker {
    padding: 17px 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
  }

  .ticker-track {
    display: flex;
    width: max-content;
    animation: tick 30s linear infinite;

    &:hover { animation-play-state: paused; }
  }

  @keyframes tick {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }

  .ticker-item {
    white-space: nowrap;
    padding: 0 36px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--t-muted);
    display: flex;
    align-items: center;
    gap: 36px;

    &::after {
      content: '\25C6';
      color: var(--gold);
      font-size: 5.5px;
    }
  }

  /* ================================================================
     SERVICES
  ================================================================ */
  .srv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    margin-top: 56px;

    @media (max-width: 1080px) { grid-template-columns: repeat(2, 1fr); }
    @media (max-width: 640px)  { grid-template-columns: 1fr; }
  }

  .srv {
    background: var(--bg);
    padding: 32px 28px;
    position: relative;
    transition: background .25s;

    &:hover {
      background: var(--card);

      & .srv-arrow { transform: translate(3px, -3px); }
    }
  }

  .srv-num {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .16em;
    color: var(--t-muted);
    margin-bottom: 20px;
  }

  .srv-icon {
    margin-bottom: var(--space-s);
    color: var(--gold);

    & svg {
      width: 34px;
      height: 34px;
      stroke: var(--gold);
      fill: none;
      stroke-width: 1.3;
    }
  }

  .srv-name {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 400;
    color: var(--t-head);
    margin-bottom: 9px;
    line-height: 1.2;
  }

  .srv-desc {
    font-size: 13px;
    color: var(--t-muted);
    line-height: 1.72;
  }

  .srv-tag {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: .65;
  }

  .srv-arrow {
    position: absolute;
    top: 26px;
    right: 26px;
    font-size: 15px;
    color: var(--t-muted);
    transition: transform .25s var(--spring);
  }

  /* ================================================================
     FRAMEWORK
  ================================================================ */
  .fw-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    margin-top: 56px;

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

  .fw-dia {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 1;

    & svg { width: 100%; height: auto; }

    @media (max-width: 900px) { max-width: 340px; }
  }

  .fw-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .fw-step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px 22px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r);
    transition: background .25s, transform .25s var(--ease);

    &:hover {
      background: var(--card);
      transform: translateX(6px);
    }
  }

  .fw-n {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .12em;
    color: var(--gold);
    margin-top: 2px;
    flex-shrink: 0;
    width: 22px;
  }

  .fw-step-title {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 400;
    color: var(--t-head);
    margin-bottom: 3px;
  }

  .fw-step-desc {
    font-size: 13px;
    color: var(--t-muted);
    line-height: 1.65;
  }

  /* ================================================================
     WHY RENEKA — BENTO GRID
  ================================================================ */
  .bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    margin-top: var(--space-l);

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

  .wb {
    padding: 36px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
    transition: background .25s;

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

  .wb-geo {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);

    @media (max-width: 640px) { border-right: none; }
  }

  .wb-human {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);

    @media (max-width: 640px) { border-right: none; }
  }

  .wb-years {
    border-bottom: 1px solid var(--line);

    & .big-n { margin-bottom: 0; }
    & .wb-eye { margin-top: 7px; margin-bottom: 0; }
    & .wb-body { margin-top: 9px; }

    @media (max-width: 900px) {
      border-right: 1px solid var(--line);
    }

    @media (max-width: 640px) {
      border-right: none;
    }
  }

  .wb-mwbe {
    grid-column: span 2;
    border-right: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(138, 102, 32, .07) 0%, var(--bg) 55%);

    &:hover {
      background: linear-gradient(135deg, rgba(138, 102, 32, .12) 0%, var(--card) 55%);
    }

    @media (max-width: 640px) {
      grid-column: 1;
      border-right: none;
    }
  }

  .wb-stats {
    grid-column: 3 / 4;

    & .stat-list { margin-top: 14px; }

    @media (max-width: 900px) { grid-column: span 2; }
    @media (max-width: 640px) { grid-column: 1; }
  }

  .wb-eye {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 13px;
  }

  .wb-title {
    font-family: var(--serif);
    font-size: clamp(19px, 1.8vw, 25px);
    font-weight: 300;
    color: var(--t-head);
    line-height: 1.2;
    margin-bottom: 11px;

    & em {
      font-style: italic;
      color: var(--gold);
    }
  }

  .wb-body {
    font-size: 13.5px;
    color: var(--t-body);
    line-height: 1.75;
  }

  /* ================================================================
     CLIENTS
  ================================================================ */
  .cl-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 44px;

    & .body-t { max-width: 360px; }
  }

  .cl-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;

    @media (max-width: 1080px) { grid-template-columns: repeat(4, 1fr); }
    @media (max-width: 640px)  { grid-template-columns: repeat(2, 1fr); }
  }

  .cl-cell {
    background: var(--bg);
    min-height: 82px;
    padding: 20px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s;

    &:hover {
      background: var(--card);

      & span { color: var(--t-head); }
    }

    & span {
      font-family: var(--serif);
      font-size: 12.5px;
      color: var(--t-muted);
      text-align: center;
      line-height: 1.35;
      transition: color .25s;
    }
  }

  /* ── Testimonial ─────────────────────────────────────────── */
  .testi {
    margin-top: 44px;
    padding: 48px 52px;
    background: var(--card);
    border: 1px solid var(--line-g);
    border-radius: var(--r);
    position: relative;
    overflow: hidden;

    &::before {
      content: '\201C';
      position: absolute;
      top: -14px;
      left: 40px;
      font-family: var(--serif);
      font-size: 150px;
      font-weight: 300;
      color: var(--gold);
      opacity: .12;
      line-height: 1;
      pointer-events: none;
    }

    @media (max-width: 640px) {
      padding: 32px 24px;

      &::before { font-size: 90px; }
    }
  }

  .testi-q {
    font-family: var(--serif);
    font-size: clamp(17px, 1.9vw, 22px);
    font-weight: 300;
    font-style: italic;
    line-height: 1.58;
    color: var(--t-head);
    max-width: 680px;
    margin-bottom: 26px;
    position: relative;
  }

  .testi-who {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .testi-av {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 15px;
    color: var(--gold);
    flex-shrink: 0;
  }

  .testi-info {
    & p:first-child {
      font-size: 13.5px;
      color: var(--t-head);
      font-weight: 400;
    }

    & p:last-child {
      font-size: 11.5px;
      color: var(--t-muted);
      letter-spacing: .03em;
    }
  }

  /* ================================================================
     CONTACT / CTA
  ================================================================ */
  .cta-wrap { background: var(--bg-alt); }

  .cta-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: flex-start;

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

    @media (max-width: 640px) { gap: 40px; }
  }

  .cta-perks {
    margin: var(--space-m) 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
  }

  .cta-perk {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 14px;
    color: var(--t-body);

    &::before {
      content: '';
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--gold);
      flex-shrink: 0;
    }
  }

  /* ================================================================
     FOOTER
  ================================================================ */
  footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    padding: 60px 0 34px;
  }

  .foot-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-l);
    margin-bottom: 52px;

    @media (max-width: 1080px) { grid-template-columns: 1fr 1fr; }
    @media (max-width: 640px)  { grid-template-columns: 1fr; gap: 28px; }
  }

  .foot-brand p {
    font-size: 13.5px;
    color: var(--t-muted);
    line-height: 1.75;
    margin: 13px 0 20px;
    max-width: 270px;
  }

  .foot-socials { display: flex; gap: 10px; }

  .foot-soc {
    width: 44px;  /* WCAG 2.2 target size */
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;

    &:hover {
      background: var(--card);
      border-color: var(--line-g);

      & svg { fill: var(--gold); }
    }

    & svg {
      width: 14px;
      height: 14px;
      fill: var(--t-muted);
      transition: fill .2s;
    }
  }

  .foot-col-h {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--t-head);
    margin-bottom: 18px;
  }

  .foot-links {
    display: flex;
    flex-direction: column;
    gap: 9px;

    & a {
      font-size: 13px;
      color: var(--t-muted);
      transition: color .2s, padding-left .2s;
      min-height: 24px; /* WCAG 2.2 minimum */
      display: inline-flex;
      align-items: center;

      &:hover {
        color: var(--t-head);
        padding-left: 4px;
      }
    }
  }

  .foot-btm {
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .foot-copy {
    font-size: 11px;
    color: var(--t-muted);
    letter-spacing: .02em;
  }

  .foot-legal {
    display: flex;
    gap: 18px;

    & a {
      font-size: 11px;
      color: var(--t-muted);
      transition: color .2s;
      min-height: 24px;
      display: inline-flex;
      align-items: center;

      &:hover { color: var(--t-head); }
    }
  }
}
