/* Atlantic Dream — site theme */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-normal.woff2) format("woff2-variations"), url(fonts/archivo-latin-wdth-normal.woff2) format("woff2");
}
:root {
  /* Palette drawn from the Atlantic Dream logo blues, with buoy yellow for actions */
  --ink: #0B2B57;        /* deep logo navy: hero, footer, headings */
  --tide: #2E64A3;       /* logo mid-blue: sunglasses band, links */
  --foam: #E3ECF6;       /* pale blue surfaces */
  --salt: #F5F8FC;       /* page background */
  --card: #FFFFFF;       /* product image ground */
  --buoy: #F5C242;       /* buoy yellow: primary actions */
  --buoy-ink: #0B2B57;
  --line: #CCD9E9;
  --muted: #4C5E75;
  --text: #0B2B57;
  --on-ink: #F3F7FC;
  --on-ink-muted: #AFC3DD;
  --head-bg: #FFFFFF;
  --head-fg: #0B2B57;
  --head-muted: #4C5E75;
  --head-line: #DCE5F0;
  --danger: #B3261E;
  --radius: 14px;
  --wrap: 1240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #061A36; --tide: #1F4C80; --foam: #102A4A; --salt: #0A1F3B; --card: #F4F7FB;
    --line: #24406A; --muted: #9FB3CD; --text: #E9F0F9; --on-ink: #EEF3FA; --on-ink-muted: #9FB3CD;
    --head-bg: #061A36; --head-fg: #E9F0F9; --head-muted: #9FB3CD; --head-line: #1B3559;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .logo-on-light { display: none; }
  :root:not([data-theme="light"]) .logo-on-dark { display: block; }
}
:root[data-theme="dark"] {
  --ink: #061A36; --tide: #1F4C80; --foam: #102A4A; --salt: #0A1F3B; --card: #F4F7FB;
  --line: #24406A; --muted: #9FB3CD; --text: #E9F0F9; --on-ink: #EEF3FA; --on-ink-muted: #9FB3CD;
  --head-bg: #061A36; --head-fg: #E9F0F9; --head-muted: #9FB3CD; --head-line: #1B3559;
  color-scheme: dark;
}
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--salt); color: var(--text);
  font-family: "Archivo", system-ui, sans-serif; font-size: 17px; line-height: 1.55;
  font-variation-settings: "wdth" 100;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--buoy); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--buoy); color: var(--buoy-ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 32px; } }

h1, h2, h3 { line-height: 1.08; margin: 0 0 .5em; font-weight: 800; }
h1, .section-title, .shades h2 { font-variation-settings: "wdth" 125; letter-spacing: -0.01em; }

/* ---------- header */
.site-header { background: var(--head-bg); color: var(--head-fg); border-bottom: 1px solid var(--head-line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.wordmark { display: block; flex: none; text-decoration: none; }
.wordmark img { height: 56px; width: auto; }
.logo-on-dark { display: none; }
.main-nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.main-nav a { text-decoration: none; color: var(--head-muted); padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--head-fg); border-color: var(--buoy); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.cart-btn, .menu-btn { background: transparent; border: 1.5px solid var(--line); color: var(--head-fg); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.cart-btn:hover, .menu-btn:hover { border-color: var(--head-fg); }
.cart-count { background: var(--buoy); color: var(--buoy-ink); min-width: 22px; height: 22px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 800; padding: 0 6px; }
.menu-btn { display: none; }
@media (max-width: 1020px) {
  .menu-btn { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--head-bg); flex-direction: column; gap: 0; padding: 8px 16px 18px; border-bottom: 1px solid var(--head-line); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--head-line); }
}

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent; font-weight: 750; text-decoration: none; cursor: pointer; font-size: 16px; transition: transform .12s ease, background .12s ease; }
.btn:active { transform: translateY(1px); }
.btn-buoy { background: var(--buoy); color: var(--buoy-ink); }
.btn-buoy:hover { background: #FFD25C; }
.btn-ghost { border-color: rgba(255,255,255,.4); color: var(--on-ink); }
.btn-ghost:hover { border-color: var(--on-ink); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: var(--tide); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.text-link { color: var(--tide); font-weight: 700; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .text-link { color: var(--buoy); } }

/* ---------- wave edge (signature) */
.wave { display: block; width: 100%; height: 44px; fill: var(--salt); margin-top: -1px; }
@media (min-width: 760px) { .wave { height: 60px; } }

/* ---------- hero */
.hero { background: var(--ink); color: var(--on-ink); overflow: hidden; }
.hero-grid { display: grid; gap: 40px; padding-top: 56px; padding-bottom: 24px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 1fr; padding-top: 88px; padding-bottom: 40px; } }
.hero h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: .98; font-weight: 900; margin-bottom: 24px; max-width: 620px; text-wrap: balance; }
.hero-copy p { color: var(--on-ink-muted); font-size: 19px; max-width: 46ch; margin: 0 0 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, minmax(0, 1fr)); aspect-ratio: 1 / .92; }
.hero-tile { background: var(--card); border-radius: 20px; overflow: hidden; display: grid; place-items: center; }
.hero-tile img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.hero-tile.t0 { grid-column: 1 / 5; grid-row: 1 / 5; z-index: 2; }
.hero-tile.t1 { grid-column: 4 / 7; grid-row: 3 / 7; z-index: 3; border: 6px solid var(--ink); }
.hero-tile.t2 { grid-column: 5 / 7; grid-row: 1 / 3; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hero-tile { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero-tile.t1 { animation-delay: .12s; } .hero-tile.t2 { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
}

/* ---------- sections */
.section { padding-top: 48px; padding-bottom: 48px; }
.section-title { font-size: clamp(28px, 3.6vw, 42px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

/* category list */
.cat-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cat-list a { display: grid; text-decoration: none; background: var(--foam); border-radius: var(--radius); padding: 12px 12px 16px; height: 100%; }
.cat-list a:hover { background: var(--line); }
.cat-list img { background: var(--card); border-radius: 10px; aspect-ratio: 1; object-fit: contain; width: 100%; margin-bottom: 12px; }
.cat-name { font-weight: 800; font-size: 17px; line-height: 1.2; }
.cat-count { color: var(--muted); font-size: 14px; }

/* product grid */
.grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 36px 20px; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card a { display: grid; gap: 4px; text-decoration: none; }
.card-img { position: relative; background: var(--card); border-radius: var(--radius); aspect-ratio: 1; overflow: hidden; margin-bottom: 10px; border: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.card a:hover .card-img img { transform: scale(1.04); }
.card a:hover .card-name { text-decoration: underline; text-underline-offset: 3px; }
.card-name { font-weight: 650; font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.card-price s, .price s { color: var(--muted); font-weight: 500; margin-left: 6px; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; z-index: 1; }

/* sunglasses band */
.shades { background: var(--tide); color: var(--on-ink); padding: 56px 0; margin-top: 24px; }
.shades-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 1000px) { .shades-grid { grid-template-columns: 1fr 2.2fr; } .shades .grid { grid-template-columns: repeat(4, 1fr); margin-top: 0; } }
.shades h2 { font-size: clamp(30px, 3.8vw, 44px); }
.shades p { color: #D6E3F3; margin: 0 0 24px; max-width: 42ch; }
.shades .card-img { border: 0; }
.shades .card-price s { color: #BCD0EA; }

/* promises */
.promises { display: grid; gap: 24px; padding-top: 56px; padding-bottom: 16px; }
@media (min-width: 760px) { .promises { grid-template-columns: repeat(3, 1fr); } }
.promises div { border-top: 3px solid var(--ink); padding-top: 16px; }
.promises h3 { font-size: 20px; margin-bottom: 6px; }
.promises p { margin: 0; color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .promises div { border-color: var(--buoy); } }

.story p { font-size: 20px; max-width: 60ch; color: var(--muted); }

/* ---------- page heads */
.page-head { background: var(--ink); color: var(--on-ink); padding-top: 48px; }
.page-head h1 { font-size: clamp(36px, 5.5vw, 64px); margin-bottom: 10px; }
.page-head p { color: var(--on-ink-muted); max-width: 56ch; margin: 0 0 8px; font-size: 18px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip { flex: none; text-decoration: none; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 15px; font-weight: 600; }
.chip:hover { border-color: var(--text); }
.chip[aria-current] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-current] { background: var(--buoy); color: var(--buoy-ink); border-color: var(--buoy); } }
.collection-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; flex-wrap: wrap; }
.count { color: var(--muted); margin: 0; }
.sort { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--muted); }
.sort select, .opt-select { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--salt); color: var(--text); }

/* ---------- product page */
.crumbs { padding-top: 20px; font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.product { display: grid; gap: 32px; padding-top: 16px; padding-bottom: 32px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; } .buybox { position: sticky; top: 88px; } }
.product > *, .hero-grid > *, .shades-grid > * { min-width: 0; }
.gallery-main { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--card); border-radius: 18px; border: 1px solid var(--line); }
.thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 8px; overflow-x: auto; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; background: var(--card); cursor: pointer; width: 72px; height: 72px; overflow: hidden; flex: none; }
.thumbs button[aria-current] { border-color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .thumbs button[aria-current] { border-color: var(--buoy); } }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.buybox h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.05; }
.subtitle { color: var(--muted); margin: -4px 0 16px; font-size: 18px; }
.price { font-size: 28px; font-weight: 850; margin: 0 0 24px; font-variant-numeric: tabular-nums; }
.price s { font-size: 20px; }
.opt-group { border: 0; padding: 0; margin: 0 0 20px; }
.opt-group legend, .qty-row label { font-weight: 700; margin-bottom: 10px; padding: 0; font-size: 15px; }
.opt-group legend span { font-weight: 500; color: var(--muted); }
.opt-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-buttons button { border: 1.5px solid var(--line); background: transparent; border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 15px; }
.opt-buttons button:hover { border-color: var(--text); }
.opt-buttons button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .opt-buttons button[aria-pressed="true"] { background: var(--buoy); color: var(--buoy-ink); border-color: var(--buoy); } }
.opt-buttons button.unavail { text-decoration: line-through; color: var(--muted); }
.opt-select { width: 100%; font-size: 16px; padding: 12px; }
.qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.qty-row label { margin: 0; }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; font-size: 20px; }
.qty input { width: 48px; text-align: center; border: 0; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ship-note { color: var(--muted); font-size: 15px; margin: 14px 0 0; }
.fine { color: var(--muted); font-size: 14px; }
.description { padding-top: 24px; padding-bottom: 16px; border-top: 1px solid var(--line); }
.description h2 { font-size: 26px; margin-top: 24px; }

/* prose */
.prose { max-width: 72ch; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose h3 { font-size: 19px; margin-top: 1.4em; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose a { color: var(--tide); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prose a { color: var(--buoy); } }
.page-prose { padding-top: 32px; }

/* contact */
.contact-email { font-size: 22px; font-weight: 800; }
.contact-form { display: grid; gap: 16px; max-width: 520px; margin-top: 24px; }
.contact-form label { display: grid; gap: 6px; font-weight: 650; font-size: 15px; }
.contact-form input, .contact-form textarea { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; background: var(--card); color: #0B2B57; font-weight: 400; }
.contact-form .btn { justify-self: start; }

/* partners */
.partner { display: grid; gap: 28px; align-items: start; }
@media (min-width: 800px) { .partner { grid-template-columns: 360px 1fr; } }
.partner img { border-radius: var(--radius); background: var(--card); }

/* ---------- cart drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(4, 18, 28, .5); z-index: 60; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--salt); z-index: 70; display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.7,.2,1), visibility 0s .28s; }
.cart-drawer.open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) { .cart-drawer, .cart-drawer.open { transition: none; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: var(--ink); color: var(--on-ink); }
.drawer-head h2 { margin: 0; font-size: 22px; font-variation-settings: "wdth" 125; }
.icon-btn { background: transparent; border: 0; color: inherit; font-size: 30px; line-height: 1; cursor: pointer; width: 44px; height: 44px; }
.cart-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; }
.cart-page .cart-body { padding: 0; max-width: 720px; }
.ship-meter { background: var(--foam); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: 15px; }
.ship-meter .bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.ship-meter .bar span { display: block; height: 100%; background: var(--tide); border-radius: 3px; }
.cart-lines { list-style: none; padding: 0; margin: 0; }
.cart-line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-line img { width: 76px; height: 76px; object-fit: contain; background: var(--card); border-radius: 10px; }
.cart-line a { display: block; text-decoration: none; font-weight: 650; line-height: 1.3; font-size: 15px; }
.cart-line .line-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.cart-line .qty { margin-top: 8px; }
.cart-line .qty button { width: 34px; height: 34px; font-size: 17px; }
.cart-line .qty span { min-width: 28px; display: inline-grid; place-items: center; }
.remove { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; margin-top: 8px; display: block; }
.cart-foot { margin-top: auto; padding-top: 20px; }
.subtotal { display: flex; justify-content: space-between; font-weight: 850; font-size: 20px; margin-bottom: 4px; }
.cart-foot .fine { margin: 0 0 16px; }
.cart-error { color: var(--danger); background: #FDECEA; border-radius: 10px; padding: 10px 12px; font-size: 15px; margin-bottom: 12px; }
.empty { text-align: left; padding: 24px 0; }
.empty p { color: var(--muted); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 12px 20px; border-radius: 999px; z-index: 80; font-weight: 650; box-shadow: 0 8px 30px rgba(4,18,28,.3); }

/* ---------- footer */
.site-footer { background: var(--ink); color: var(--on-ink-muted); margin-top: 64px; padding: 56px 0 24px; font-size: 15px; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-logo { height: 84px; width: auto; margin-bottom: 12px; }
.footer-brand { color: var(--on-ink); font-weight: 850; font-size: 22px; font-variation-settings: "wdth" 125; margin: 0 0 8px; }
.site-footer h2 { color: var(--on-ink); font-size: 16px; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--on-ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--on-ink); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; font-size: 14px; }
.footer-base p { margin: 0; }

/* ---------- small screens */
@media (max-width: 520px) {
  .header-row { gap: 10px; }
  .header-row { min-height: 64px; }
  .wordmark img { height: 46px; }
  .cart-btn, .menu-btn { padding: 6px 11px; font-size: 14px; }
  .cat-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: -16px; padding-right: 16px; padding-bottom: 6px; }
  .cat-list li { flex: 0 0 42%; scroll-snap-align: start; }
}
html, body { overflow-x: clip; }
