/* ==========================================================================
   Tacteon Ltd — marketing site
   ========================================================================== */

:root {
  --bg: #faf6f0;
  --bg-alt: #f1e9dd;
  --surface: #ffffff;
  --text: #2b2420;
  --text-muted: #6b6058;
  --accent: #bc5b34;
  --accent-dark: #9a472a;
  --accent-soft: #f0dccb;
  --secondary: #3f5d53;
  --secondary-soft: #dfe9e4;
  --border: #e7ddcf;
  --shadow: 0 1px 2px rgba(43, 36, 32, 0.04), 0 8px 24px -12px rgba(43, 36, 32, 0.12);
  --radius: 14px;
  --max-w: 1120px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1b1714;
  --bg-alt: #221c18;
  --surface: #24201b;
  --text: #f2ebe1;
  --text-muted: #b3a89a;
  --accent: #e08453;
  --accent-dark: #f0a578;
  --accent-soft: #3a2a20;
  --secondary: #8fb3a5;
  --secondary-soft: #24332d;
  --border: #3a332c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 30px -12px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1714;
    --bg-alt: #221c18;
    --surface: #24201b;
    --text: #f2ebe1;
    --text-muted: #b3a89a;
    --accent: #e08453;
    --accent-dark: #f0a578;
    --accent-soft: #3a2a20;
    --secondary: #8fb3a5;
    --secondary-soft: #24332d;
    --border: #3a332c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 30px -12px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow);
}

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

.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf7d;
  box-shadow: 0 0 0 3px rgba(76, 175, 125, 0.25);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
  max-width: 16ch;
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 28px;
}

.hero-fact strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  color: var(--accent-dark);
}
.hero-fact span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-card h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-card li {
  display: flex;
  gap: 10px;
  font-size: 0.95rem;
  align-items: flex-start;
}

.hero-card li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--secondary);
}

/* ---------- Section scaffolding ---------- */

section {
  padding: 88px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head .eyebrow {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.services-note {
  margin-top: 28px;
  padding: 18px 22px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 78ch;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 22px; height: 22px; }

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.service-price {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--secondary);
  background: var(--secondary-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
  width: fit-content;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.service-card ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.service-card li {
  font-size: 0.92rem;
  color: var(--text);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.service-card li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
  flex-shrink: 0;
}

.service-card .btn {
  align-self: flex-start;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-copy h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin-bottom: 20px;
}

.about-copy p {
  color: var(--text-muted);
}

.about-copy strong {
  color: var(--text);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.stat-card strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.stat-card span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Experience timeline ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:first-child { padding-top: 0; }
.timeline-item:last-child { border-bottom: none; }

.timeline-date {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding-top: 4px;
}

.timeline-body h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.timeline-role {
  color: var(--secondary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.timeline-body p {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
}

/* ---------- Stack strip ---------- */

.stack-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.stack-group h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  margin-bottom: 14px;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-tags .tag {
  background: var(--surface);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.contact-info h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.contact-info p {
  color: var(--text-muted);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-list .icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-list .icon svg { width: 18px; height: 18px; }

.contact-list a {
  text-decoration: none;
  font-weight: 600;
}
.contact-list a:hover { color: var(--accent); }

.contact-list .meta {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.form-status {
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}
.form-status.success { display: block; color: var(--secondary); }
.form-status.error { display: block; color: var(--accent-dark); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-grid p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--accent); }

/* ---------- Reveal animation ---------- */

/* Visible by default: JS opts elements into the hidden pre-state via
   .reveal-pending so a slow/blocked script never leaves content hidden. */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.reveal-pending {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.reveal-pending { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  section { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .nav-actions .btn-primary.btn-sm { display: none; }
  .logo { font-size: 1.05rem; white-space: nowrap; }
  .hero-facts { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; text-align: center; }
}

/* Mobile nav drawer */
.nav-links.is-open {
  display: flex;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 20px 24px 28px;
  gap: 18px;
}

/* ==========================================================================
   Articles: today's article in the hero, the five before it in a strip, the
   rest in a search dialog; each reads on its own page (articles app)
   ========================================================================== */

.articles-hero { margin-top: 56px; display: grid; gap: 28px; }

.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--text-muted); font-size: 0.9rem; margin: 0 0 12px; }
.article-meta .eyebrow { margin-bottom: 0; }

.article-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px clamp(20px, 4vw, 40px);
}
.article-feature-title { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 30ch; }
.article-feature-title a { color: inherit; text-decoration: none; }
.article-feature-title a:hover { color: var(--accent-dark); }
.article-feature-excerpt { font-size: 1.1rem; max-width: 70ch; margin: 0 0 24px; }
.article-feature .hero-ctas { margin-bottom: 0; }

.article-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.article-recent-head h3 { margin: 0; font-size: 1.15rem; }
.article-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0 0 6px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.article-strip li { scroll-snap-align: start; }
.article-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--secondary);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}
.article-chip:hover .article-chip-title { color: var(--accent-dark); }
.article-chip-meta { font-size: 0.8rem; color: var(--text-muted); }
.article-chip-title { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.25; }

.articles-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(80vh, 760px);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow);
}
.articles-dialog::backdrop { background: rgba(27, 23, 20, 0.55); }
.articles-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.articles-dialog-head h2 { margin: 0; font-size: 1.5rem; }
.articles-dialog-search {
  width: 100%;
  margin-top: 16px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.articles-dialog-status { margin: 10px 0 4px; font-size: 0.9rem; color: var(--text-muted); }
.articles-dialog-list { margin: 0; padding: 0; list-style: none; }
.articles-dialog-list a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}
.articles-dialog-list a:hover .article-chip-title { color: var(--accent-dark); }
.articles-dialog-excerpt { font-size: 0.92rem; color: var(--text-muted); }

.article-page { padding: 64px 0 96px; }
.article-story { max-width: 68ch; margin: 0 auto; font-size: 1.1rem; line-height: 1.7; }
.article-story h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); }
.article-story .lede { font-size: 1.2rem; color: var(--text-muted); }
.article-story h2 { font-size: 1.6rem; margin-top: 1.6em; }
.article-draft { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); }
.article-inline-cta { margin: 28px 0; }
.article-ctas {
  margin-top: 40px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
}
.article-ctas p { margin-top: 0; }
.article-ctas .hero-ctas { margin-bottom: 0; }
.article-more { max-width: 68ch; margin: 56px auto 0; }
