/* AMAI Marine · base: reset, typography, layout, the seam motif, focus ring, controls, shell. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--page); color: var(--ink);
  font: 400 var(--fs-body)/var(--lh-body) var(--sans);
  font-feature-settings: 'kern' 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
main { flex: 1 0 auto; display: block; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p, dl, dd, figure, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:where(h1, h2, h3) { font-weight: 600; letter-spacing: var(--track-display); line-height: 1; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: .92; }
h2 { font-size: var(--fs-h2); line-height: .98; }
h3 { font-size: var(--fs-h3); line-height: 1.04; letter-spacing: -.02em; }
/* one emphasised word per heading, and Croatian names */
:where(h1, h2, h3, .display) em, .hr-name {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em;
}
p { max-width: 62ch; text-wrap: pretty; }
.lede { font-size: var(--fs-lede); line-height: 1.4; color: var(--ink-2); max-width: 34ch; }
.meta { font-size: var(--fs-meta); color: var(--muted); line-height: 1.45; }
.fine { font-size: var(--fs-meta); color: var(--muted); line-height: 1.5; max-width: 72ch; }
.num, .money { font-variant-numeric: tabular-nums lining-nums; }
.money { color: var(--brass); font-weight: 500; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.gap-s { padding-top: var(--gap-s); }
.gap-l { padding-top: var(--gap-l); }

/* ---------- eyebrow: the lapped glyph marks a section, nothing else ---------- */
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font-size: var(--fs-meta); font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.eyebrow::before {
  content: ''; flex: none; width: 28px; height: 5px;
  background:
    linear-gradient(var(--seam), var(--seam)) 12px 0 / 16px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 4px / 24px 1px no-repeat;
}
.eyebrow .hr-name { font-size: 16px; color: var(--ink-2); letter-spacing: 0; }

/* ---------- the seam: two 1 px lines, the upper one starts a lap (40 px) later ---------- */
.seam { position: relative; height: 5px; }
.seam::before, .seam::after { content: ''; position: absolute; height: 1px; right: 0; transform-origin: 0 50%; }
.seam::before { left: 0; top: 4px; background: var(--hairline); }
.seam::after { left: var(--lap); top: 0; background: var(--seam); }
.seam.is-ink::before { background: var(--ink); opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
  .js .seam-draw::before, .js .seam-draw::after { transform: scaleX(0); transition: transform var(--t-draw) var(--ease-seam); }
  .js .seam-draw::after { transition-delay: var(--t-lap); }
  .js .seam-draw.is-drawn::before, .js .seam-draw.is-drawn::after { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .js .seam-draw { opacity: 0; transition: opacity 200ms linear; }
  .js .seam-draw.is-drawn { opacity: 1; }
}

/* ---------- focus: the seam ring, :focus-visible only ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 1px solid var(--ink); outline-offset: 4px;
  box-shadow: 0 9px 0 -8px var(--seam);
  border-radius: var(--radius-control);
}
@media (prefers-reduced-motion: no-preference) {
  :focus-visible { animation: focus-draw var(--t-touch) var(--ease-out) both; }
}
@keyframes focus-draw { from { outline-color: transparent; outline-offset: 9px; box-shadow: 0 9px 0 -8px transparent; } }
.skip { position: fixed; left: 16px; top: -80px; z-index: 100; background: var(--action); color: var(--on-action); padding: 12px 16px; font-size: var(--fs-ui); text-decoration: none; }
.skip:focus-visible { top: 12px; }

/* ---------- links and buttons ---------- */
.link-seam {
  --c: currentColor;
  display: inline-flex; align-items: baseline; gap: .4em; padding-bottom: 7px;
  color: var(--ink); font-weight: 500; text-decoration: none;
  background:
    linear-gradient(var(--seam), var(--seam)) var(--lap) 0 / calc(100% - var(--lap)) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 4px / 100% 1px no-repeat;
  background-position: var(--lap) 100%, 0 calc(100% - 4px);
  transition: background-size var(--t-touch) var(--ease-out);
}
.link-seam:hover { background-size: calc(100% - var(--lap)) 1px, calc(100% - 12px) 1px; }
.link-seam .arrow { font-family: var(--sans); transition: transform var(--t-touch) var(--ease-out); }
.link-seam:hover .arrow { transform: translateX(4px); }
.link-quiet { color: var(--ink-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--hairline); }
.link-quiet:hover { text-decoration-color: currentColor; color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px;
  border: 1px solid var(--action); border-radius: var(--radius-control);
  background: var(--action); color: var(--on-action);
  font-size: var(--fs-ui); font-weight: 500; letter-spacing: .005em; text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-touch) var(--ease-out), color var(--t-touch) var(--ease-out);
}
.btn:hover { background: transparent; color: var(--action); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-quiet:hover { border-color: var(--ink); }

/* the "Standard" tag: the only other place sand appears */
.std { display: inline-block; padding: 2px 8px; border-radius: var(--radius-control); background: var(--sand); color: var(--ink); font-size: var(--fs-meta); font-weight: 500; line-height: 1.5; white-space: nowrap; }

/* ---------- the mark: a lapped A (crossbar overlapping a second, offset stroke) ---------- */
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; line-height: 1; }
.mark svg { width: 30px; height: 30px; flex: none; overflow: visible; }
.mark svg path { fill: none; stroke: currentColor; stroke-linecap: square; }
.mark svg .mk-lap { stroke: var(--seam); }
.mark-word { font-weight: 600; font-size: 20px; letter-spacing: .12em; margin-right: -.12em; }
.mark-sub { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--page); }
.header-row { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.header-row .mark { margin-right: auto; }
.site-nav { display: flex; align-items: center; gap: 32px; }
.nav-list { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  position: relative; display: block; padding: 10px 0; font-size: var(--fs-ui); font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color var(--t-touch) var(--ease-out);
}
.nav-list a:hover { color: var(--ink); }
.nav-list a::before, .nav-list a::after { content: ''; position: absolute; height: 1px; bottom: 2px; transform: scaleX(0); transform-origin: 0 50%; transition: transform var(--t-draw) var(--ease-seam); }
.nav-list a::before { left: 0; right: 0; background: var(--ink); bottom: 2px; }
.nav-list a::after { left: 12px; right: -8px; background: var(--seam); bottom: 6px; transition-delay: var(--t-lap); }
.nav-list a[aria-current="page"] { color: var(--ink); }
.nav-list a[aria-current="page"]::before, .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.lang { display: flex; align-items: center; gap: 2px; font-size: var(--fs-meta); color: var(--muted); }
.lang button { background: none; border: 0; padding: 10px 6px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--seam); }
.menu-btn { display: none; background: none; border: 0; padding: 10px 0; font-size: var(--fs-ui); font-weight: 500; color: var(--ink); }
.menu-btn .menu-lines { display: inline-block; width: 22px; height: 6px; margin-left: 10px; vertical-align: middle;
  background: linear-gradient(var(--ink), var(--ink)) 0 5px / 22px 1px no-repeat, linear-gradient(var(--seam), var(--seam)) 8px 0 / 14px 1px no-repeat; }
.header-seam { position: absolute; left: 0; right: 0; bottom: -4px; pointer-events: none; }
.header-seam::after { left: max(var(--gutter), calc((100% - var(--max)) / 2)); }

@media (max-width: 900px) {
  .header-row { gap: 16px; }
  .menu-btn { display: inline-flex; align-items: center; order: 3; }
  .site-nav { order: 2; }
  .site-nav .nav-list { display: none; }
  .site-nav.is-open .nav-list {
    display: flex; flex-direction: column; gap: 0; position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0;
    padding: 24px var(--gutter) 48px; background: var(--page); overflow-y: auto; z-index: 39;
  }
  .site-nav.is-open .nav-list li { border-bottom: 1px solid var(--hairline); }
  .site-nav.is-open .nav-list a { padding: 20px 0; font-size: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
  .site-nav.is-open .nav-list a::before, .site-nav.is-open .nav-list a::after { display: none; }
  .site-nav.is-open .nav-list a[aria-current="page"] { font-family: var(--serif); font-style: italic; font-weight: 400; }
  .mark-sub { display: none; }
}

/* route change: the content cross-fades, nothing slides */
@media (prefers-reduced-motion: no-preference) {
  #app.is-entering { animation: route-in var(--t-swap) var(--ease-settle) both; }
}
@keyframes route-in { from { opacity: 0; } }

/* ---------- footer ---------- */
.site-footer { margin-top: var(--gap-l); padding-bottom: 40px; color: var(--ink-2); font-size: var(--fs-ui); }
.site-footer .seam { margin-bottom: 56px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 40px 32px; align-items: start; }
.foot-brand p { margin-top: 20px; max-width: 34ch; }
.foot-brand .foot-line { font-size: var(--fs-lede); line-height: 1.35; color: var(--ink); letter-spacing: -.01em; }
.foot-col h2 { font-size: var(--fs-meta); font-weight: 500; letter-spacing: .02em; color: var(--muted); margin-bottom: 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-col a { color: var(--ink-2); text-decoration: none; }
.foot-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.foot-company { margin-top: 16px; font-size: var(--fs-meta); color: var(--muted); line-height: 1.6; }
.foot-base { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px 40px; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.foot-terms { font-size: var(--fs-meta); color: var(--muted); max-width: 96ch; }
.theme-btn {
  display: inline-flex; align-items: center; gap: 10px; flex: none; background: none; border: 0; padding: 8px 0;
  font-size: var(--fs-meta); font-weight: 500; color: var(--ink-2);
}
.theme-btn .tb-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}

/* the rail slot sits at the bottom of the viewport; the configurator fills it */
#rail:empty { display: none; }
