/* =============================================================================
   MariMare Labs — shared styles
   Editorial-maritime: warm bone paper, deep marine ink, tide-coral accent.
   ========================================================================== */

:root {
  --paper:    #f2ede2;
  --paper-2:  #e9e1d2;
  --ink:      #0d1a19;
  --ink-soft: #44524f;
  --teal:     #1c5a55;
  --accent:   #d8492b;
  --accent-d: #b83b20;
  --line:     rgba(13, 26, 25, 0.14);
  --line-2:   rgba(13, 26, 25, 0.08);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "Space Mono", "SFMono-Regular", Menlo, monospace;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 56px); }

section { position: relative; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.02; letter-spacing: -0.015em; margin: 0; font-optical-sizing: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); display: inline-block; }

a { color: inherit; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line-2);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); }
.wordmark svg { display: block; }
.wordmark b { font-weight: 600; }
.wordmark span { color: var(--teal); }

.nav { display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.6rem); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.nav a { text-decoration: none; color: var(--ink-soft); transition: color 0.25s var(--ease); position: relative; }
.nav a:hover { color: var(--ink); }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0; background: var(--accent); transition: width 0.3s var(--ease); }
.nav a:hover::after { width: 100%; }

/* ---------- hero ---------- */
.hero { padding: clamp(5rem, 13vh, 9rem) 0 clamp(3.5rem, 8vh, 6rem); position: relative; }
.hero h1 {
  font-size: clamp(2.9rem, 9vw, 7.4rem);
  letter-spacing: -0.03em;
  max-width: 16ch;
}
.hero h1 em { font-style: italic; font-variation-settings: "SOFT" 40; color: var(--teal); }
.hero .lede {
  margin: clamp(1.6rem, 4vw, 2.4rem) 0 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  color: var(--ink-soft);
  line-height: 1.55;
}
.hero .actions { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; padding: 0.95em 1.5em; border-radius: 2px;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn svg { transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translate(3px, -3px); }

/* tide line decoration */
.tide { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 80px; pointer-events: none; opacity: 0.5; }
.tide path { fill: none; stroke: var(--teal); stroke-width: 1.4; opacity: 0.35; }

/* ---------- products ---------- */
.products { padding: clamp(3.5rem, 8vh, 6rem) 0; border-top: 1px solid var(--line); }
.products .head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: baseline; justify-content: space-between; margin-bottom: clamp(2rem, 5vw, 3.4rem); }
.products .head h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
.products .head p { margin: 0; color: var(--ink-soft); max-width: 34ch; font-size: 0.98rem; }

.prod-list { display: grid; gap: 0; }
.prod {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: clamp(1rem, 3vw, 2.6rem);
  align-items: center;
  padding: clamp(1.8rem, 4vw, 2.8rem) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: padding-left 0.4s var(--ease);
}
.prod:last-child { border-bottom: 1px solid var(--line); }
.prod::before { content: ""; position: absolute; left: -100%; top: 0; bottom: 0; width: 100%; background: var(--ink); z-index: -1; transition: left 0.45s var(--ease); }
.prod:hover { padding-left: 1.6rem; color: var(--paper); }
.prod:hover::before { left: 0; }
.prod:hover .prod-num,
.prod:hover .prod-tag { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 40%, transparent); }
.prod:hover .prod-desc { color: color-mix(in srgb, var(--paper) 78%, transparent); }
.prod:hover .prod-go { background: var(--accent); color: var(--paper); border-color: var(--accent); }

.prod-num { font-family: var(--mono); font-size: 0.85rem; color: var(--accent); padding-top: 0.4rem; transition: color 0.4s var(--ease); }
.prod-body h3 { font-size: clamp(1.7rem, 4vw, 2.9rem); line-height: 1; }
.prod-body h3 .plat { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; vertical-align: middle; margin-left: 0.9rem; color: var(--teal); }
.prod-desc { margin: 0.7rem 0 0; max-width: 52ch; color: var(--ink-soft); font-size: 1rem; transition: color 0.4s var(--ease); }
.prod-tags { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.prod-tag { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.35em 0.7em; border: 1px solid var(--line); border-radius: 100px; color: var(--ink-soft); transition: color 0.4s var(--ease), border-color 0.4s var(--ease); }
.prod-go { width: 3rem; height: 3rem; flex: none; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: all 0.35s var(--ease); }
.prod-go svg { transition: transform 0.3s var(--ease); }
.prod:hover .prod-go svg { transform: translate(2px, -2px); }

/* ---------- studio strip ---------- */
.studio { padding: clamp(3.5rem, 9vh, 7rem) 0; border-top: 1px solid var(--line); background: var(--paper-2); }
.studio .grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.studio h2 { font-size: clamp(1.9rem, 4.5vw, 3.4rem); max-width: 14ch; }
.studio .col p { color: var(--ink-soft); font-size: 1.05rem; max-width: 50ch; }
.studio .col p + p { margin-top: 1.1rem; }
.studio .meta { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.05em; color: var(--ink); display: grid; gap: 0.9rem; margin-top: 0.4rem; }
.studio .meta div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.studio .meta span:first-child { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; }
.studio .meta a { color: var(--accent); text-decoration: none; }
.studio .meta a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.site-foot { padding: clamp(3rem, 7vh, 5rem) 0 2.5rem; border-top: 1px solid var(--line); }
.site-foot .top { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-end; }
.site-foot .big { font-family: var(--display); font-size: clamp(2.4rem, 8vw, 5.5rem); line-height: 0.95; letter-spacing: -0.03em; }
.site-foot .big em { font-style: italic; color: var(--teal); font-variation-settings: "SOFT" 40; }
.foot-links { display: flex; flex-direction: column; gap: 0.6rem; font-family: var(--mono); font-size: 0.82rem; }
.foot-links a { color: var(--ink-soft); text-decoration: none; transition: color 0.2s var(--ease); }
.foot-links a:hover { color: var(--accent); }
.site-foot .legal { margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.04em; }

/* ---------- load animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal 0.9s var(--ease) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.15s; } .d3 { animation-delay: 0.28s; }
.d4 { animation-delay: 0.42s; } .d5 { animation-delay: 0.56s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .nav .hide-sm { display: none; }
  .prod { grid-template-columns: 2.6rem 1fr; }
  .prod-go { display: none; }
  .studio .grid { grid-template-columns: 1fr; }
}

/* ============================ legal / privacy ============================ */
.legal-page { padding: clamp(3rem, 8vh, 6rem) 0 clamp(4rem, 10vh, 7rem); }
.legal-layout { display: grid; grid-template-columns: 230px 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.legal-toc { position: sticky; top: 96px; font-family: var(--mono); font-size: 0.78rem; line-height: 1.5; }
.legal-toc .eyebrow { margin-bottom: 1rem; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: 0.55rem; }
.legal-toc a { text-decoration: none; color: var(--ink-soft); display: flex; gap: 0.6rem; transition: color 0.2s var(--ease); }
.legal-toc a:hover { color: var(--accent); }
.legal-toc a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); color: var(--accent); }

.legal-body { max-width: 70ch; }
.legal-body .title { font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -0.03em; }
.legal-body .updated { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.06em; margin: 1.2rem 0 2.6rem; display: inline-block; padding: 0.4em 0.8em; border: 1px solid var(--line); border-radius: 2px; }
.legal-body .intro { font-size: 1.18rem; color: var(--ink); line-height: 1.55; }
.legal-body h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2.8rem 0 0.9rem; padding-top: 2.4rem; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.legal-body h2 .nx { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); margin-right: 0.8rem; vertical-align: 0.25em; }
.legal-body h3 { font-family: var(--sans); font-weight: 700; font-size: 1.02rem; margin: 1.6rem 0 0.4rem; letter-spacing: 0; }
.legal-body p, .legal-body li { color: var(--ink-soft); }
.legal-body p { margin: 0.8rem 0; }
.legal-body ul { margin: 0.8rem 0; padding-left: 1.1rem; }
.legal-body li { margin: 0.45rem 0; }
.legal-body li::marker { color: var(--accent); }
.legal-body a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.legal-body strong { color: var(--ink); font-weight: 600; }
.callout { background: var(--paper-2); border-left: 3px solid var(--accent); padding: 1.1rem 1.3rem; margin: 1.6rem 0; border-radius: 0 3px 3px 0; }
.callout p { margin: 0; font-size: 0.95rem; }

@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; display: none; }
}
