/* Nantucket Living — design system
   Navy, shingle gray, crisp white, sand, with signal-flag accents. */
:root {
  --navy: #14213d;
  --navy-2: #22355e;
  --ink: #1d1d1f;
  --shingle: #8a8f96;      /* decorative only */
  --shingle-dark: #555b63; /* text-safe gray (7:1 on white) */
  --fog: #e7e5e0;
  --sand: #f6f4ef;
  --white: #ffffff;
  --signal-red: #b3122b;
  --signal-yellow: #f2b705;
  --signal-blue: #1d4f91;
  --focus: #1d4f91;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius: 2px;
  --wrap: 1200px;
  --gap: clamp(16px, 3vw, 32px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--signal-blue); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--navy); line-height: 1.2; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--navy); color: var(--white); padding: 10px 16px; z-index: 100; }
.skip:focus { top: 8px; color: var(--white); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }
.center { text-align: center; }
.fine { font-size: .85rem; color: var(--shingle-dark); }
.eyebrow { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--shingle-dark); margin-bottom: .75em; }
.lede { font-size: 1.15rem; color: #3a3d42; }
.hp { position: absolute; left: -9999px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 1.6em; border: 1px solid transparent; border-radius: var(--radius); font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-2); color: var(--white); }
.btn--primary[disabled] { background: #7b8396; cursor: not-allowed; }
.btn--light { background: var(--white); color: var(--navy); }
.btn--light:hover { background: var(--sand); color: var(--navy); }
.btn--ghost-light { border-color: rgba(255,255,255,.85); color: var(--white); }
.btn--ghost-light:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn--block { width: 100%; }
.icon-btn { background: none; border: 0; font-size: 1.2rem; width: 44px; height: 44px; cursor: pointer; color: var(--navy); }
.link-arrow { font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }

/* Announcement + header */
.announce { background: var(--navy); color: var(--white); text-align: center; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; padding: 8px 12px; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--fog); }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.logo-word { font-family: var(--serif); font-size: 1.05rem; letter-spacing: .24em; text-transform: uppercase; white-space: nowrap; }
.flags { flex: none; }
.menu-toggle { background: none; border: 0; width: 44px; height: 44px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 2px; background: var(--navy); position: relative; content: ""; transition: transform .2s; }
.burger::before { position: absolute; top: -7px; } .burger::after { position: absolute; top: 7px; }
.menu-toggle[aria-expanded="true"] .burger { background: transparent; }
.menu-toggle[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }
.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--fog); }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gap) 16px; }
.site-nav a { display: block; padding: 12px 0; text-decoration: none; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); border-bottom: 1px solid var(--fog); }
.site-nav a[aria-current="page"] { color: var(--signal-red); }
.bag-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; background: none; border: 0; cursor: pointer; color: var(--navy); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.bag-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; background: var(--navy); color: var(--white); font-size: .72rem; letter-spacing: 0; }
@media (max-width: 420px) { .logo-word { font-size: .82rem; letter-spacing: .16em; } .bag-toggle > span:not(.bag-count) { display: none; } .logo .flags { width: 34px; } }
@media (min-width: 960px) {
  .menu-toggle { display: none; }
  .site-nav { display: block; position: static; border: 0; margin-left: 28px; }
  .site-nav ul { display: flex; gap: 26px; padding: 0; }
  .site-nav a { border: 0; padding: 6px 0; font-size: .76rem; }
  .site-nav a:hover { color: var(--signal-blue); }
}

/* Hero */
.hero { position: relative; color: var(--white); min-height: min(78vh, 680px); display: flex; align-items: flex-end; overflow: hidden; background: var(--navy); }
.hero-media { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(20,33,61,0) 30%, rgba(20,33,61,.82) 100%),
  linear-gradient(90deg, rgba(20,33,61,.6) 0%, rgba(20,33,61,0) 62%),
  url("/images/hero-960.jpg") 24% center / cover no-repeat,
  #14213d; }
@media (min-width: 701px) { .hero-media { background:
  linear-gradient(180deg, rgba(20,33,61,0) 35%, rgba(20,33,61,.78) 100%),
  linear-gradient(90deg, rgba(20,33,61,.78) 0%, rgba(20,33,61,.45) 38%, rgba(20,33,61,0) 64%),
  url("/images/hero.jpg") center / cover no-repeat,
  #14213d; } }
.hero h1, .hero-sub, .hero .eyebrow { text-shadow: 0 1px 12px rgba(10,18,36,.55); }
.hero-inner { position: relative; padding-top: 120px; padding-bottom: clamp(48px, 9vw, 96px); max-width: var(--wrap); width: 100%; }
.hero h1 { color: var(--white); font-size: clamp(2.4rem, 7vw, 4.4rem); }
.hero .eyebrow { color: rgba(255,255,255,.85); }
.hero-sub { max-width: 36em; font-size: 1.1rem; color: rgba(255,255,255,.92); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Sections */
.section { padding: clamp(48px, 8vw, 88px) 0 0; }
.section.wrap { padding-left: var(--gap); padding-right: var(--gap); }
.section-title { text-align: left; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--gap); }
@media (min-width: 720px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile-link { display: block; text-decoration: none; color: inherit; background: var(--sand); }
.tile-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--fog); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tile-link:hover .tile-img img { transform: scale(1.03); }
.tile-copy { padding: 20px 22px 24px; }
.tile-copy p { color: #45484d; }

.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px var(--gap); }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-img { aspect-ratio: 1; background: var(--sand); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: transform .4s; }
.card-link:hover .card-img img { transform: scale(1.04); }
.card-title { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--ink); margin: 12px 0 4px; }
.card-link:hover .card-title { text-decoration: underline; }
.card-meta { font-size: .88rem; color: var(--shingle-dark); margin: 0; }
.price { color: var(--navy); font-weight: 600; }
.empty { padding: 40px 0; color: var(--shingle-dark); }

.story { margin-top: clamp(56px, 9vw, 104px); background: var(--sand); border-top: 1px solid var(--fog); border-bottom: 1px solid var(--fog); }
.story-inner { display: grid; gap: var(--gap); padding-top: clamp(48px, 8vw, 88px); padding-bottom: clamp(48px, 8vw, 88px); }
.story-photo { margin: 0; }
.story-photo img { width: 100%; height: auto; aspect-ratio: 750 / 955; object-fit: cover; }
.story-photo figcaption { font-size: .82rem; color: var(--shingle-dark); margin-top: 8px; }
.story-text { display: grid; gap: 32px; }
@media (min-width: 900px) { .story-inner { grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: 56px; } }
.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.promises li { display: grid; gap: 2px; padding-left: 18px; border-left: 3px solid var(--signal-red); }
.promises li:nth-child(2) { border-color: var(--signal-yellow); }
.promises li:nth-child(3) { border-color: var(--signal-blue); }
.promises span { color: #45484d; }
.signup-band { padding-bottom: clamp(48px, 8vw, 88px); max-width: 720px; }

/* Signup */
.signup-row { display: flex; flex-wrap: wrap; gap: 8px; }
.signup input[type=email] { flex: 1 1 200px; min-height: 48px; padding: 0 14px; border: 1px solid #8d929a; border-radius: var(--radius); background: var(--white); }
.signup-msg, .form-msg { min-height: 1.4em; margin-top: 8px; font-size: .9rem; }
.signup-msg.ok, .form-msg.ok { color: #1f6b3a; }
.signup-msg.err, .form-msg.err { color: var(--signal-red); }

/* Page heads, crumbs, filters */
.page-head { padding-top: 28px; padding-bottom: 8px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 16px 0 18px; font-size: .8rem; color: var(--shingle-dark); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--shingle); }
.crumbs a { color: var(--shingle-dark); }
.collection { padding-bottom: 72px; }
.filters { border-top: 1px solid var(--fog); border-bottom: 1px solid var(--fog); margin-bottom: 20px; }
.filters summary { cursor: pointer; padding: 14px 0; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--navy); }
.filter-form { display: grid; gap: 18px; padding-bottom: 20px; }
@media (min-width: 720px) { .filter-form { grid-template-columns: repeat(3, 1fr); } .filter-actions { grid-column: 1 / -1; } }
.filter-group { border: 0; margin: 0; padding: 0; }
.filter-group legend { font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.check { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.filter-actions { display: flex; align-items: center; gap: 18px; }
.result-count { font-size: .85rem; color: var(--shingle-dark); }

/* Product */
.product { padding-bottom: 80px; }
.product-grid { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .product-grid { grid-template-columns: 1.15fr 1fr; align-items: start; } .buy { position: sticky; top: 92px; } }
.gallery-main { background: var(--sand); aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; }
.thumb { padding: 0; border: 2px solid transparent; background: var(--sand); cursor: pointer; width: 72px; height: 72px; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.thumb[aria-current="true"] { border-color: var(--navy); }
.buy h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.buy-price { font-size: 1.3rem; color: var(--navy); font-weight: 600; }
.opt { border: 0; padding: 0; margin: 0 0 20px; }
.opt legend { font-weight: 600; margin-bottom: 10px; color: var(--navy); }
.opt legend span { font-weight: 400; color: #3a3d42; }
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch, .size { position: relative; cursor: pointer; }
.swatch input, .size input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.swatch-chip { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--chip); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); outline: 2px solid transparent; outline-offset: 3px; }
.swatch input:checked + .swatch-chip { outline-color: var(--navy); }
.swatch input:focus-visible + .swatch-chip { outline: 3px solid var(--focus); }
.size span { display: grid; place-items: center; min-width: 52px; height: 44px; padding: 0 12px; border: 1px solid #8d929a; font-size: .9rem; background: var(--white); }
.size input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.size input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.size input:disabled + span { color: #8a8f96; background: repeating-linear-gradient(135deg, #fff 0 6px, #f0efec 6px 12px); text-decoration: line-through; cursor: not-allowed; }
.qty-label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.qty input { width: 90px; min-height: 44px; padding: 0 10px; border: 1px solid #8d929a; }
.buy-error, .bag-error { color: var(--signal-red); min-height: 1.2em; margin: 12px 0; font-size: .9rem; }
.buy-note { margin-top: 12px; }
.acc { border-top: 1px solid var(--fog); }
.acc:last-of-type { border-bottom: 1px solid var(--fog); }
.acc summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-weight: 400; }
.acc[open] summary::after { content: "–"; }
.acc-body { padding-bottom: 16px; }
.acc-body ul { padding-left: 1.1em; margin: 0 0 1em; }
.table-scroll { overflow-x: auto; }
.size-table, .order-table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.size-table th, .size-table td, .order-table th, .order-table td { border-bottom: 1px solid var(--fog); padding: 8px 10px; text-align: left; }
.size-table thead th { background: var(--sand); }
.order-table .num { text-align: right; }

/* Content pages */
.prose { max-width: 760px; padding-bottom: 80px; }
.prose h2 { margin-top: 1.6em; font-size: 1.45rem; }
.prose ul { padding-left: 1.2em; }
.confirm { padding-top: 40px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; color: var(--navy); }
.field input, .field textarea { min-height: 48px; padding: 10px 12px; border: 1px solid #8d929a; border-radius: var(--radius); width: 100%; }

/* Footer */
.site-footer { background: var(--navy); color: #dfe3ea; margin-top: 0; }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.6fr; } }
.logo--footer { color: var(--white); }
.logo--footer .logo-word { color: var(--white); }
.footer-h { font-family: var(--sans); color: var(--white); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.footer-note { color: #c9cfda; font-size: .9rem; margin-top: 14px; }
.site-footer .fine { color: #c9cfda; }
.site-footer .signup input[type=email] { border-color: transparent; }
.site-footer .btn--primary { background: var(--white); color: var(--navy); }
.site-footer .signup-msg.ok { color: #9be0b4; } .site-footer .signup-msg.err { color: #ffb3bd; }
.footer-base { border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; padding-bottom: 28px; font-size: .8rem; color: #c9cfda; }

/* Bag drawer */
.bag-overlay { position: fixed; inset: 0; background: rgba(20,33,61,.45); z-index: 80; }
.bag { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--white); z-index: 90; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(0,0,0,.15); }
.bag[hidden], .bag-overlay[hidden] { display: none; }
.bag-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--fog); }
.bag-head h2 { margin: 0; font-size: 1.35rem; }
.bag-ship { padding: 12px 20px; font-size: .88rem; background: var(--sand); }
.bag-ship .meter { height: 4px; background: var(--fog); margin-top: 8px; }
.bag-ship .meter span { display: block; height: 100%; background: var(--navy); }
.bag-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.bag-item { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--fog); }
.bag-item img { width: 76px; height: 76px; object-fit: cover; background: var(--sand); }
.bag-item h3 { font-family: var(--sans); font-size: .92rem; font-weight: 600; margin: 0 0 2px; color: var(--ink); }
.bag-item .fine { margin: 0 0 6px; }
.bag-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #8d929a; }
.stepper button { width: 36px; height: 36px; background: none; border: 0; cursor: pointer; font-size: 1.1rem; }
.stepper span { min-width: 28px; text-align: center; }
.remove { background: none; border: 0; padding: 6px 0; font-size: .8rem; text-decoration: underline; cursor: pointer; color: var(--shingle-dark); }
.bag-foot { padding: 16px 20px 20px; border-top: 1px solid var(--fog); }
.bag-row { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: 4px; }
.bag-empty { padding: 32px 0; text-align: center; color: var(--shingle-dark); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
