@layer reset, tokens, base, layout, components, states;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    min-height: 100%;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
  }

  body {
    min-height: 100%;
    margin: 0;
  }

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

  button {
    cursor: pointer;
  }

  img,
  svg {
    display: block;
    max-width: 100%;
  }

  h1,
  h2,
  h3,
  p,
  figure,
  fieldset {
    margin: 0;
  }
}

@layer tokens {
  :root {
    color-scheme: light;
    --font-primary: "Helvetica Now Text", Helvetica, Arial, sans-serif;
    --font-size-xs: 10px;
    --font-size-sm: 12px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 30px;
    --font-size-3xl: 44px;
    --line-base: 16.5px;
    --weight-base: 300;
    --text-primary: #212121;
    --text-secondary: #0000ee;
    --text-tertiary: #ffffff;
    --surface-base: #000000;
    --surface-page: #ffffff;
    --surface-soft: #f7f7f5;
    --surface-card: #f2f2ef;
    --surface-muted: #e8e8e3;
    --border-soft: #d8d8d2;
    --rolex-green: #006039;
    --rolex-green-dark: #00452c;
    --rolex-gold: #a37e2c;
    --sale-red: #c01822;
    --space-1: 5px;
    --space-2: 8px;
    --space-3: 10px;
    --space-4: 12.8px;
    --space-5: 20px;
    --shell-width: 420px;
    --motion-instant: 300ms;
    --shadow-sheet: 0 -18px 60px rgb(0 0 0 / 22%);
  }
}

@layer base {
  body {
    background: #e6e6e2;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--weight-base);
    line-height: var(--line-base);
    text-rendering: geometricPrecision;
  }

  a {
    color: inherit;
  }

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

@layer layout {
  .mobile-shell {
    width: min(100%, var(--shell-width));
    min-height: 100dvh;
    margin-inline: auto;
    overflow: clip;
    background: var(--surface-page);
    box-shadow: 0 0 0 1px rgb(0 0 0 / 8%);
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 64px;
    padding: max(9px, env(safe-area-inset-top)) 18px var(--space-2);
    background: rgb(255 255 255 / 96%);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(18px);
    transition: transform 260ms ease, box-shadow 260ms ease;
    will-change: transform;
  }

  .page-intro {
    display: grid;
    gap: 17px;
    padding: 58px 44px 48px;
    background: var(--surface-page);
  }

  .view-panel {
    position: sticky;
    top: 64px;
    z-index: 40;
    display: grid;
    gap: var(--space-5);
    padding: 17px var(--space-5) 16px;
    background: rgb(255 255 255 / 96%);
    border-block: 1px solid var(--border-soft);
    backdrop-filter: blur(18px);
    transition: top 260ms ease, transform 260ms ease, opacity 180ms ease, box-shadow 260ms ease;
    will-change: transform;
  }

  body.nav-hidden .site-header {
    transform: translateY(calc(-100% - 2px));
  }

  body.nav-hidden .view-panel {
    top: 0;
    transform: translateY(calc(-100% - 2px));
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
  }

  .collection-list {
    padding: 0 10px 30px;
  }

  .watch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
  }

}

@layer components {
  .menu-button,
  .header-actions button {
    min-width: 30px;
    min-height: 36px;
    border: 0;
    background: transparent;
    color: var(--text-primary);
  }

  .menu-button {
    display: inline-flex;
    gap: var(--space-2);
    align-items: center;
    justify-self: start;
    padding: 0;
    font-size: var(--font-size-sm);
    font-weight: 400;
  }

  .menu-button > span:first-child {
    position: relative;
    width: 18px;
    height: 12px;
  }

  .menu-button > span:first-child::before,
  .menu-button > span:first-child::after {
    position: absolute;
    left: 0;
    width: 18px;
    height: 1px;
    background: currentColor;
    content: "";
  }

  .menu-button > span:first-child::before {
    top: 2px;
  }

  .menu-button > span:first-child::after {
    bottom: 2px;
  }

  .brand-lockup {
    display: block;
    color: var(--rolex-green);
    text-decoration: none;
  }

  .brand-lockup img {
    width: 70px;
    height: auto;
    object-fit: contain;
  }

  .header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
  }

  .header-actions button {
    display: grid;
    place-items: center;
    padding: 0;
  }

  .header-actions svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
  }

  .eyebrow {
    color: var(--rolex-green);
    font-size: var(--font-size-sm);
    font-weight: 700;
  }

  .page-intro h1 {
    max-width: 7ch;
    font-size: var(--font-size-3xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 44px;
    text-wrap: balance;
  }

  .view-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #d2d2cc;
    border-radius: 999px;
    background: var(--surface-soft);
    padding: 4px;
  }

  .view-toggle button {
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #555550;
    font-size: var(--font-size-sm);
    font-weight: 700;
  }

  .view-toggle button.is-active {
    background: var(--rolex-green);
    color: var(--text-tertiary);
  }

  .toolbar {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-1);
    scrollbar-width: none;
  }

  .toolbar::-webkit-scrollbar {
    display: none;
  }

  .toolbar button {
    flex: 0 0 auto;
    min-height: 38px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--surface-page);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    white-space: nowrap;
  }

  .toolbar button {
    padding: 0 14px;
  }

  .watch-card {
    position: relative;
    display: grid;
    min-width: 0;
    overflow: clip;
    background: #f8f8f6;
  }

  .watch-media {
    position: relative;
    display: grid;
    height: 246px;
    place-items: center;
    background: #f8f8f6;
  }

  .watch-media img {
    width: min(92%, 156px);
    height: 222px;
    object-fit: contain;
    filter: drop-shadow(0 18px 10px rgb(0 0 0 / 8%));
  }

  .favorite-button {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    width: 32px;
    min-height: 32px;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--rolex-green);
  }

  .favorite-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .watch-copy {
    display: grid;
    gap: 6px;
    min-height: 206px;
    padding: 0 18px 18px;
  }

  .watch-copy .collection {
    color: var(--rolex-green);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .watch-copy h3 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 24px;
    text-wrap: balance;
  }

  .watch-copy .spec {
    color: #686864;
    font-size: 15px;
    font-weight: 300;
    line-height: 20px;
  }

  .watch-meta {
    display: none;
    color: #6c6c67;
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .price-action {
    display: grid;
    align-items: center;
    gap: 10px;
    margin-top: auto;
  }

  .price-action strong {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .order-button {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--rolex-green);
    border-radius: 999px;
    background: var(--rolex-green);
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
    font-weight: 700;
  }

  .promo-panel {
    position: relative;
    isolation: isolate;
    grid-column: 1 / -1;
    display: grid;
    min-height: 388px;
    overflow: clip;
    align-content: end;
    padding: 252px 20px 24px;
    background: #f3f4f3;
  }

  .promo-panel::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(to bottom, rgb(243 244 243 / 0%) 0%, rgb(243 244 243 / 0%) 43%, rgb(243 244 243 / 68%) 64%, rgb(243 244 243 / 98%) 100%);
    content: "";
    pointer-events: none;
  }

  .promo-visual {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
  }

  .promo-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--promo-position, center top);
    opacity: 0.98;
  }

  .promo-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    max-width: 300px;
  }

  .promo-copy h3 {
    max-width: 10ch;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 26px;
    text-wrap: balance;
  }

  .promo-copy span {
    color: #555550;
    font-size: var(--font-size-md);
    line-height: 19px;
  }

  .promo-copy a {
    display: inline-grid;
    grid-auto-flow: column;
    gap: 7px;
    align-items: center;
    width: fit-content;
    margin-top: 12px;
    color: var(--rolex-green);
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-decoration: none;
  }

  .promo-copy a::after {
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: "";
    rotate: 45deg;
  }

  .site-footer {
    display: grid;
    justify-items: center;
    gap: 0;
    padding: 38px 0 calc(24px + env(safe-area-inset-bottom));
    background: #111;
    color: var(--text-tertiary);
    text-align: left;
  }

  .footer-brand {
    display: grid;
    place-items: center;
    width: 100%;
    margin-bottom: 28px;
    text-decoration: none;
  }

  .footer-brand img {
    width: 92px;
    height: auto;
  }

  .footer-shortcuts,
  .footer-nav,
  .footer-legal {
    width: 100%;
    padding-inline: 28px;
  }

  .footer-shortcuts {
    display: grid;
    gap: 13px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgb(255 255 255 / 18%);
  }

  .footer-shortcuts h2 {
    color: rgb(255 255 255 / 48%);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .footer-shortcuts a,
  .footer-nav a,
  .footer-legal a {
    color: var(--text-tertiary);
    font-size: var(--font-size-md);
    font-weight: 400;
    line-height: 22px;
    text-decoration: none;
  }

  .footer-nav details {
    border-bottom: 1px solid rgb(255 255 255 / 18%);
  }

  .footer-nav summary {
    position: relative;
    display: block;
    min-height: 58px;
    padding-block: 20px;
    color: var(--text-tertiary);
    font-size: var(--font-size-md);
    font-weight: 700;
    list-style: none;
  }

  .footer-nav summary::-webkit-details-marker {
    display: none;
  }

  .footer-nav summary::after {
    position: absolute;
    top: 22px;
    right: 0;
    color: rgb(255 255 255 / 58%);
    content: "+";
    font-size: var(--font-size-lg);
    font-weight: 300;
  }

  .footer-nav details[open] summary::after {
    content: "-";
  }

  .footer-nav details > a {
    display: block;
    padding-bottom: 12px;
    color: rgb(255 255 255 / 72%);
    font-size: var(--font-size-sm);
    line-height: 18px;
  }

  .footer-nav details > a:last-child {
    padding-bottom: 22px;
  }

  .footer-legal {
    display: grid;
    gap: 12px;
    padding-top: 26px;
  }

  .footer-legal a {
    color: rgb(255 255 255 / 62%);
    font-size: var(--font-size-xs);
    line-height: 16px;
  }

  .order-dialog {
    width: min(100%, var(--shell-width));
    max-width: var(--shell-width);
    max-height: calc(100dvh - 20px);
    margin: auto auto 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .order-dialog::backdrop {
    background: rgb(0 0 0 / 55%);
  }

  .order-form {
    position: relative;
    display: grid;
    gap: 12px;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 16px 14px calc(20px + env(safe-area-inset-bottom));
    background: var(--surface-page);
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow-sheet);
  }

  .dialog-handle {
    justify-self: center;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: var(--border-soft);
  }

  .dialog-close {
    position: absolute;
    top: 18px;
    right: 14px;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-base);
    color: var(--text-tertiary);
    font-size: var(--font-size-2xl);
    line-height: 1;
  }

  .dialog-header {
    display: grid;
    gap: 3px;
    padding: 2px 58px 2px 0;
  }

  .dialog-header p {
    color: var(--rolex-green);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 16px;
    text-transform: uppercase;
  }

  .dialog-header h2 {
    color: var(--text-primary);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 28px;
  }

  .dialog-product {
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 244px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: var(--surface-soft);
  }

  .dialog-product-visual {
    display: grid;
    min-width: 0;
    min-height: 214px;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    background:
      radial-gradient(circle at 50% 72%, rgb(0 0 0 / 10%), transparent 20%),
      #ffffff;
  }

  .dialog-product img {
    width: 100%;
    height: 214px;
    object-fit: contain;
    filter: drop-shadow(0 18px 12px rgb(0 0 0 / 14%));
  }

  .dialog-product p {
    color: var(--rolex-green);
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 17px;
  }

  .dialog-product h3 {
    margin-top: 6px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 22px;
    text-transform: uppercase;
    text-wrap: balance;
  }

  .dialog-product span {
    display: block;
    margin-top: 8px;
    color: #686864;
    font-size: var(--font-size-xs);
    font-weight: 700;
    line-height: 16px;
    text-transform: uppercase;
  }

  .dialog-product em {
    display: block;
    margin-top: 5px;
    color: #686864;
    font-size: var(--font-size-xs);
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
    text-transform: uppercase;
  }

  .dialog-product strong {
    display: block;
    margin-top: 8px;
    color: var(--sale-red);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 36px;
  }

  .dialog-product small {
    display: block;
    margin-top: 6px;
    color: #686864;
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 18px;
  }

  .dialog-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dialog-benefits span {
    display: grid;
    align-content: center;
    min-height: 54px;
    padding: 9px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--surface-page);
    color: #4d4d49;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 13px;
    text-align: center;
    text-transform: uppercase;
  }

  .order-form label {
    display: grid;
    gap: var(--space-1);
  }

  .order-form label > span,
  .qty-options legend {
    color: #686864;
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
  }

  .order-form input,
  .order-form textarea,
  .order-form select {
    width: 100%;
    border: 1px solid #b9b9b3;
    border-radius: 14px;
    background: var(--surface-page);
    color: var(--text-primary);
    font-size: var(--font-size-md);
  }

  .order-form input,
  .order-form select {
    min-height: 48px;
    padding: 0 14px;
  }

  .order-form select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #686864 50%), linear-gradient(135deg, #686864 50%, transparent 50%);
    background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
  }

  .order-form textarea {
    resize: vertical;
    min-height: 82px;
    padding: 14px;
  }

  .location-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: var(--space-3);
  }

  .qty-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    padding: 0;
    border: 0;
  }

  .qty-options legend {
    grid-column: 1 / -1;
  }

  .qty-options label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #b9b9b3;
    border-radius: 14px;
    font-size: var(--font-size-md);
    font-weight: 700;
  }

  .qty-options input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--rolex-green);
  }

  .confirm-order {
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    background: var(--rolex-green);
    color: var(--text-tertiary);
    font-size: var(--font-size-lg);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .confirm-order:disabled {
    opacity: 0.68;
    cursor: progress;
  }

  .dialog-trust {
    display: grid;
    gap: 7px;
    padding: 2px 3px;
    color: #4f4f49;
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .dialog-trust span::before {
    color: var(--rolex-green);
    content: "- ";
  }

  .form-status {
    min-height: 20px;
    color: var(--rolex-green);
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-align: center;
  }

  .thank-shell {
    background: var(--surface-page);
  }

  .thank-header {
    grid-template-columns: 1fr auto 1fr;
  }

  .thank-back {
    display: grid;
    width: 38px;
    min-height: 38px;
    place-items: center;
    color: var(--text-primary);
    text-decoration: none;
  }

  .thank-back svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .thank-hero {
    display: grid;
    gap: 16px;
    padding: 62px 34px 42px;
  }

  .thank-hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 44px;
  }

  .thank-hero p:last-child {
    color: #555550;
    font-size: var(--font-size-lg);
    line-height: 24px;
  }

  .thank-card,
  .concierge-card {
    margin: 0 var(--space-5) 20px;
    padding: 20px;
    border: 1px solid var(--border-soft);
    background: var(--surface-soft);
  }

  .thank-label {
    color: var(--rolex-green);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  #thankOrderId {
    display: block;
    margin-top: 8px;
    font-size: var(--font-size-lg);
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .thank-product {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    align-items: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
  }

  .thank-product img {
    width: 96px;
    height: 128px;
    object-fit: contain;
  }

  .thank-product p {
    font-size: var(--font-size-md);
    font-weight: 700;
    line-height: 20px;
  }

  .thank-product span {
    display: block;
    margin-top: 8px;
    color: var(--sale-red);
    font-size: var(--font-size-xl);
    font-weight: 700;
  }

  .concierge-card h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 32px;
  }

  .concierge-card p {
    margin-top: 12px;
    color: #555550;
    font-size: var(--font-size-md);
    line-height: 22px;
  }

  .concierge-card ol {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: steps;
  }

  .concierge-card li {
    counter-increment: steps;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 38px;
    font-size: var(--font-size-sm);
    font-weight: 700;
  }

  .concierge-card li::before {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--rolex-green);
    color: var(--text-tertiary);
    content: counter(steps);
    font-size: var(--font-size-xs);
  }

  .thank-actions {
    display: grid;
    gap: 12px;
    padding: 0 var(--space-5) 34px;
  }

  .primary-link,
  .secondary-link {
    display: grid;
    min-height: 52px;
    place-items: center;
    border-radius: 999px;
    font-size: var(--font-size-md);
    font-weight: 700;
    text-decoration: none;
  }

  .primary-link {
    background: var(--rolex-green);
    color: var(--text-tertiary);
  }

  .secondary-link {
    border: 1px solid var(--rolex-green);
    color: var(--rolex-green);
  }

  .thank-footer {
    padding-bottom: calc(36px + env(safe-area-inset-bottom));
  }
}

@layer states {
  button,
  a,
  input,
  textarea,
  select,
  summary {
    -webkit-tap-highlight-color: transparent;
  }

  button:active {
    transform: scale(0.98);
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  summary:focus-visible {
    outline: 2px solid var(--text-secondary);
    outline-offset: 3px;
  }

  .order-dialog[open] {
    animation: dialog-rise var(--motion-instant) ease both;
  }

  @keyframes dialog-rise {
    from {
      opacity: 0;
      translate: 0 24px;
    }

    to {
      opacity: 1;
      translate: 0 0;
    }
  }
}
