/* ============================================================
   Tideseed — styles.css
   Palette: ink #10222c · slate #1e4d6b · steel #3a6a86 · bg #fafbfc
   Fonts: Sora (display) · Inter (body) · JetBrains Mono (mono)
   ============================================================ */

:root {
  --ink: #10222c;
  --ink-soft: #2e4250;
  --teal: #1e4d6b;
  --teal-dark: #133849;
  --seafoam: #3a6a86;
  --gray: #5a646c;
  --gray-light: #8b949c;
  --line: #e3e7ea;
  --bg: #fafbfc;
  --bg-alt: #f1f5f6;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 16px rgba(16, 34, 44, 0.07);
  --shadow-lg: 0 10px 40px rgba(16, 34, 44, 0.12);
  --font-display: "Sora", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; letter-spacing: -0.015em; }

.container { width: min(1140px, 92%); margin-inline: auto; }

.mono { font-family: var(--font-mono); }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(250, 251, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 12px rgba(16,34,44,0.05); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { height: 34px; width: auto; }
.nav-brand .brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.18rem;
  letter-spacing: 0.14em; color: var(--ink);
}

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--ink-soft); font-size: 0.95rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--teal); }

.nav-cta {
  background: var(--ink); color: var(--white) !important;
  padding: 9px 20px; border-radius: 999px; font-weight: 600;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--teal); }

.lang-switch {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
  color: var(--gray); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 10px; transition: all 0.2s;
}
.lang-switch:hover { border-color: var(--teal); color: var(--teal); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; position: relative; z-index: 110;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  margin: 5px auto; transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; background: var(--bg);
    flex-direction: column; justify-content: center; gap: 32px;
    transform: translateX(100%); transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.25rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 170px 0 110px;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(45, 212, 191, 0.08), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(13, 125, 135, 0.07), transparent 60%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; }

.hero-kicker {
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500;
  color: var(--teal); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 700;
  max-width: 17ch; margin-bottom: 24px;
}
.hero h1 .grad {
  background: linear-gradient(95deg, var(--teal), var(--seafoam));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--gray);
  max-width: 56ch; margin-bottom: 38px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  padding: 13px 28px; border-radius: 999px; border: 0; cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--teal); color: var(--white); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.hero-mark {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: clamp(220px, 30vw, 420px); opacity: 0.10; pointer-events: none;
}
@media (max-width: 700px) { .hero-mark { display: none; } }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section.alt { background: var(--bg-alt); }

.section-kicker {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--teal);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px;
}
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; margin-bottom: 16px; }
.section-lead { color: var(--gray); max-width: 64ch; font-size: 1.06rem; margin-bottom: 48px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 30px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(13,125,135,0.35); }
.card h3 { font-size: 1.22rem; margin-bottom: 12px; }
.card p { color: var(--gray); font-size: 0.97rem; }
.card .card-icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(13,125,135,0.12), rgba(45,212,191,0.12));
  color: var(--teal);
}
.card .card-icon svg { width: 24px; height: 24px; }
.card-link { display: inline-block; margin-top: 16px; font-weight: 600; font-size: 0.92rem; }
.card-link::after { content: " →"; }

/* tag pills */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--teal-dark);
  background: rgba(13,125,135,0.08); border-radius: 999px; padding: 4px 12px;
}

/* ---------- Product banner (Robokami) ---------- */
.product-banner {
  background: var(--ink); color: var(--white);
  border-radius: 16px; padding: 56px 50px;
  position: relative; overflow: hidden;
}
.product-banner::after {
  content: ""; position: absolute; right: -60px; top: -80px;
  width: 340px; height: 340px; border-radius: 50%;
  border: 2px solid rgba(45, 212, 191, 0.25);
}
.product-banner::before {
  content: ""; position: absolute; right: 60px; top: -120px;
  width: 2px; height: 480px; background: rgba(255,255,255,0.12);
  transform: rotate(24deg);
}
.product-banner h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 14px; }
.product-banner p { color: rgba(255,255,255,0.78); max-width: 58ch; margin-bottom: 26px; }
.product-banner .btn-light {
  background: var(--white); color: var(--ink);
}
.product-banner .btn-light:hover { background: var(--seafoam); transform: translateY(-1px); }

/* ---------- Project list (services page) ---------- */
.project { 
  display: grid; grid-template-columns: 56px 1fr; gap: 22px;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.project:last-child { border-bottom: 0; }
.project-num {
  font-family: var(--font-mono); font-size: 1rem; color: var(--gray-light);
  padding-top: 4px;
}
.project h3 { font-size: 1.18rem; margin-bottom: 8px; }
.project p { color: var(--gray); font-size: 0.97rem; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; }
@media (max-width: 880px) { .contact-wrap { grid-template-columns: 1fr; gap: 40px; } }

.contact-info p { color: var(--gray); margin-bottom: 22px; }
.contact-info .contact-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--ink-soft); font-size: 0.97rem; }
.contact-line svg { width: 18px; height: 18px; color: var(--teal); flex-shrink: 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.96rem;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--white); color: var(--ink); transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); }
textarea { resize: vertical; min-height: 130px; }

.form-status { margin-top: 14px; font-size: 0.94rem; display: none; }
.form-status.ok { display: block; color: var(--teal-dark); }
.form-status.err { display: block; color: #c0392b; }

.cf-turnstile { margin: 6px 0 2px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.72);
  padding: 60px 0 36px; font-size: 0.92rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 44px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255,255,255,0.72); transition: color 0.2s; }
.site-footer a:hover { color: var(--seafoam); }
.footer-brand img { height: 30px; margin-bottom: 14px; filter: invert(1) brightness(1.6); }
.footer-brand p { max-width: 34ch; font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 26px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 0.84rem; color: rgba(255,255,255,0.5);
}

/* ---------- Prose pages (privacy / terms) ---------- */
.prose { max-width: 760px; margin-inline: auto; padding: 150px 0 90px; }
.prose h1 { font-size: 2.1rem; margin-bottom: 24px; }
.prose h2 { font-size: 1.35rem; margin: 38px 0 14px; }
.prose p, .prose li { color: var(--ink-soft); margin-bottom: 14px; }
.prose ul { padding-left: 22px; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
