/* ============================================================
   AMBROCK GROUP — styles.css
   Mobile-first · Hydrodynamic / tidal design language
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Palette */
  --color-bg:        #f4f1ec;   /* warm parchment */
  --color-surface:   #ffffff;
  --color-text:      #1b1b1b;
  --color-text-mid:  #4a4a4a;
  --color-accent:    #1a7a6d;   /* deep teal — the single accent */
  --color-accent-light: #e4f3f0;
  --color-accent-dark:  #145f55;
  --color-border:    #d8d3cb;

  /* Typography */
  --ff-sans:  'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --ff-serif: Georgia, 'Times New Roman', serif;

  /* Spacing scale — rhythmic, wave-like progression */
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  1.75rem;
  --sp-lg:  3rem;
  --sp-xl:  5rem;
  --sp-2xl: 8rem;

  /* Fluid type */
  --fs-body:   clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-lead:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --fs-h3:     clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  --fs-h2:     clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem);
  --fs-h1:     clamp(2rem, 1.4rem + 2.5vw, 3.4rem);

  /* Motion */
  --ease-tide: cubic-bezier(0.37, 0, 0.28, 1);
  --dur-fast:  0.25s;
  --dur-mid:   0.5s;
  --dur-slow:  0.8s;
}

/* ---------- RESET / BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-dark); }

/* Visible keyboard focus */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background-color: var(--color-accent);
  color: var(--color-surface);
}

/* ---------- CONTAINER ---------- */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--sp-sm);
}

@media (min-width: 48em) {
  .container { padding-inline: var(--sp-md); }
}

/* ---------- WAVE DIVIDERS ---------- */
.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  line-height: 0;
}
.wave-flip { transform: scaleY(-1); }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-surface);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  transition: color var(--dur-fast) var(--ease-tide);
}
.logo:hover { color: var(--color-accent); }
.logo-icon { flex-shrink: 0; }
.logo-text { white-space: nowrap; }

/* Nav toggle (mobile) */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0.25rem;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Nav list */
.nav-list {
  list-style: none;
  position: absolute;
  top: 3.75rem;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--sp-sm) 0;
  transform: translateY(-0.75rem);
  opacity: 0;
  visibility: hidden;
  transition:
    transform var(--dur-mid) var(--ease-tide),
    opacity var(--dur-mid) var(--ease-tide),
    visibility 0s var(--dur-mid);
}
.nav-list.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition:
    transform var(--dur-mid) var(--ease-tide),
    opacity var(--dur-mid) var(--ease-tide),
    visibility 0s 0s;
}
.nav-link {
  display: block;
  padding: 0.6rem var(--sp-sm);
  color: var(--color-text);
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease-tide);
}
.nav-link:hover { color: var(--color-accent); }

@media (min-width: 48em) {
  .nav-toggle { display: none; }
  .nav-list {
    position: static;
    display: flex;
    gap: var(--sp-md);
    background: none;
    border: none;
    padding: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav-link { padding: 0.35rem 0; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background-color: var(--color-bg);
  padding: var(--sp-xl) 0 var(--sp-2xl);
  text-align: center;
  overflow: hidden;
}

.hero-eyebrow {
  font-family: var(--ff-serif);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-sm);
  animation: drift-in 1s var(--ease-tide) both;
}

#hero-heading {
  font-family: var(--ff-serif);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  max-width: 44rem;
  margin-inline: auto;
  margin-bottom: var(--sp-md);
  animation: drift-in 1s var(--ease-tide) 0.15s both;
}

.hero-sub {
  font-size: var(--fs-lead);
  color: var(--color-text-mid);
  max-width: 38rem;
  margin-inline: auto;
  margin-bottom: var(--sp-lg);
  animation: drift-in 1s var(--ease-tide) 0.3s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  justify-content: center;
  animation: drift-in 1s var(--ease-tide) 0.45s both;
}

/* Tide dots — decorative, floating */
.tide-dots {
  position: absolute;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.65rem;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
  opacity: 0.35;
  animation: bob 3s var(--ease-tide) infinite;
}
.dot:nth-child(2) { animation-delay: 0.4s; }
.dot:nth-child(3) { animation-delay: 0.8s; }
.dot:nth-child(4) { animation-delay: 1.2s; }
.dot:nth-child(5) { animation-delay: 1.6s; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 2rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-tide),
    color var(--dur-fast) var(--ease-tide),
    transform var(--dur-fast) var(--ease-tide),
    box-shadow var(--dur-fast) var(--ease-tide);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-surface);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-surface);
  box-shadow: 0 4px 18px rgba(26, 122, 109, 0.3);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-ghost:hover {
  background-color: var(--color-accent);
  color: var(--color-surface);
}

/* ---------- SECTIONS ---------- */
.section {
  padding: var(--sp-xl) 0;
}

.section-intro {
  font-size: var(--fs-lead);
  color: var(--color-text-mid);
  max-width: 38rem;
  margin-bottom: var(--sp-lg);
}

h2 {
  font-family: var(--ff-serif);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--sp-sm);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

/* ---------- ABOUT — flow grid ---------- */
.about {
  background-color: var(--color-bg);
}
.flow-grid {
  display: grid;
  gap: var(--sp-lg);
}
.flow-text p {
  color: var(--color-text-mid);
  margin-bottom: var(--sp-sm);
}
.flow-text p:last-child { margin-bottom: 0; }

.flow-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.converge-svg {
  opacity: 0.85;
  animation: gentle-pulse 6s var(--ease-tide) infinite alternate;
}

@media (min-width: 48em) {
  .flow-grid {
    grid-template-columns: 1.3fr 0.7fr;
    align-items: center;
  }
}

/* ---------- VENTURES — cards ---------- */
.ventures {
  background-color: var(--color-accent-light);
  position: relative;
}

.card-grid {
  list-style: none;
  display: grid;
  gap: var(--sp-md);
}
@media (min-width: 42em) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background-color: var(--color-surface);
  border-radius: 1rem;
  padding: var(--sp-md);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition:
    transform var(--dur-mid) var(--ease-tide),
    box-shadow var(--dur-mid) var(--ease-tide);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(26, 122, 109, 0.12);
}
.card-icon { margin-bottom: var(--sp-sm); }
.card p { color: var(--color-text-mid); }

/* ---------- PUBLISHING ---------- */
.publishing {
  background-color: var(--color-surface);
}

.pub-features {
  display: grid;
  gap: var(--sp-md);
}
@media (min-width: 42em) {
  .pub-features { grid-template-columns: repeat(3, 1fr); }
}

.pub-item {
  padding: var(--sp-md) 0;
  border-top: 2px solid var(--color-accent-light);
  transition: border-color var(--dur-mid) var(--ease-tide);
}
.pub-item:hover {
  border-top-color: var(--color-accent);
}
.pub-icon { margin-bottom: var(--sp-xs); }
.pub-item p { color: var(--color-text-mid); }

/* ---------- CONTACT ---------- */
.contact {
  background-color: var(--color-bg);
  position: relative;
}

.contact-form {
  display: grid;
  gap: var(--sp-sm);
  max-width: 40rem;
}
@media (min-width: 42em) {
  .contact-form { grid-template-columns: 1fr 1fr; }
  .form-group-full { grid-column: 1 / -1; }
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--ff-sans);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 0.5rem;
  transition:
    border-color var(--dur-fast) var(--ease-tide),
    box-shadow var(--dur-fast) var(--ease-tide);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(26, 122, 109, 0.15);
}

.form-group textarea { resize: vertical; }

/* ---------- FOOTER ---------- */
.site-footer {
  background-color: var(--color-text);
  color: var(--color-border);
  position: relative;
}
.site-footer .wave-divider path { fill: var(--color-text); }

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding-block: var(--sp-lg) var(--sp-md);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-surface);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  justify-content: center;
}
.footer-links a {
  color: var(--color-border);
  font-size: 0.9rem;
  transition: color var(--dur-fast) var(--ease-tide);
}
.footer-links a:hover { color: var(--color-surface); }

.footer-copy {
  font-size: 0.8rem;
  color: #888888;
}

@media (min-width: 48em) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
}

/* ==========================================================
   ANIMATIONS — tidal micro-interactions
   ========================================================== */

/* Drift in from below (hero stagger) */
@keyframes drift-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bob — gentle vertical float for dots */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Gentle pulse for decorative SVG */
@keyframes gentle-pulse {
  from { transform: scale(1); }
  to   { transform: scale(1.04); }
}

/* ==========================================================
   SCROLL-TRIGGERED TIDE REVEALS
   Using CSS-only approach with @keyframes + animation-timeline
   where supported; otherwise graceful fallback.
   ========================================================== */

/* Intersection-observer-friendly classes toggled by a tiny
   scroll-reveal script (progressive enhancement). */
.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition:
    opacity var(--dur-slow) var(--ease-tide),
    transform var(--dur-slow) var(--ease-tide);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   PRINT
   ========================================================== */
@media print {
  .site-header,
  .wave-divider,
  .tide-dots,
  .nav-toggle { display: none; }
  body { background: #ffffff; color: #000000; }
}
