/* ============================================================
   TheoTech — shared design system
   Coastal-but-professional B2B palette. Clean, credible.
   ============================================================ */

:root {
  --ink:       #0c2233;
  --ink-2:     #16394f;
  --teal:      #1b2c4e;
  --teal-deep: #12203b;
  --teal-soft: #e0e4ee;
  --sand:      #f5f1e8;
  --paper:     #fbf9f4;
  --line:      #e6ddcf;
  --muted:     #566571;
  --muted-2:   #7c8892;
  --white:     #ffffff;
  --amber:     #d98a3d;
  --shadow:    0 1px 2px rgba(12,34,51,.06), 0 8px 28px rgba(12,34,51,.08);
  --shadow-lg: 0 24px 60px rgba(12,34,51,.16);
  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1140px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 550;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  color: var(--ink);
}

p { margin: 0 0 1rem; }

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

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

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

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 .9rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .96rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(27,44,78,.28); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }

/* ---- Top nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,249,244,.97);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(12,34,51,.03);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px;
  flex: none;
}
.brand-word {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: .16em;
  color: var(--ink);
  text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  color: var(--ink-2);
  font-weight: 500;
  font-size: .95rem;
}
.nav-links a:hover { color: var(--teal-deep); text-decoration: none; }
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ---- Sections ---- */
section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 108px 0 96px;
  background:
    radial-gradient(1200px 420px at 78% -8%, var(--teal-soft) 0%, rgba(215,235,233,0) 60%),
    linear-gradient(180deg, var(--sand) 0%, var(--paper) 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.04;
  margin-bottom: 1.1rem;
}
.hero h1 em { font-style: italic; color: var(--teal-deep); }
.hero-sub {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: .9rem; color: var(--muted-2); margin: 1.4rem 0 0; }

/* Hero illustration card stack */
.hero-visual { position: relative; }
.hero-logo {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  display: block;
}
.hero-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
}
.hero-card .hc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hero-card .hc-row:last-child { border-bottom: 0; }
.hc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hc-dot.ok { background: var(--teal); }
.hc-dot.warn { background: var(--amber); }
.hc-dot.idle { background: #c4cdd3; }
.hc-label { font-weight: 500; font-size: .92rem; }
.hc-meta { margin-left: auto; font-size: .82rem; color: var(--muted-2); }

/* ---- Service cards ---- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--teal-soft); }
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--teal-soft);
  color: var(--teal-deep);
  margin-bottom: 18px;
}
.card h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ---- Demo cards ---- */
#demos { background: linear-gradient(180deg, var(--paper) 0%, var(--sand) 100%); }
.demo-group-heading {
  font-size: 1.3rem;
  margin: 0 0 .3rem;
}
.demo-group-heading:not(:first-of-type) { margin-top: 48px; }
.demo-group-sub {
  color: var(--muted);
  font-size: .96rem;
  max-width: 640px;
  margin: 0 0 24px;
}
.demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.demo-grid-3 { grid-template-columns: repeat(3, 1fr); }
.demo-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .22s ease;
}
.demo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.demo-thumb {
  height: 150px;
  position: relative;
  display: grid; place-items: center;
  color: #fff;
  overflow: hidden;
}
.demo-thumb.marina { background: linear-gradient(135deg, #0c4a6e 0%, #0f8a8a 100%); }
.demo-thumb.pool   { background: linear-gradient(135deg, #0a6767 0%, #23a6c4 100%); }
.demo-thumb.home   { background: linear-gradient(135deg, #16394f 0%, #2b8a7a 100%); }
.demo-thumb.houseiq{ background: linear-gradient(135deg, #3b2f6e 0%, #0f8a8a 100%); }
.demo-thumb.simplyclean{ background: linear-gradient(135deg, #0d5c63 0%, #4fd1c5 100%); }
.demo-thumb svg { width: 100%; height: 100%; position: absolute; inset: 0; opacity: .35; }
.demo-thumb .thumb-title { position: relative; font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; z-index: 1; }
.demo-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--teal-deep);
  background: var(--teal-soft);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 12px; align-self: flex-start;
}
.badge.real { color: #6b4bb3; background: #ece6f8; }
.demo-body h3 { font-size: 1.35rem; margin-bottom: .35rem; }
.demo-body .demo-desc { color: var(--muted); font-size: .96rem; margin-bottom: 1rem; }
.feature-list { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.feature-list li { position: relative; padding-left: 24px; font-size: .92rem; color: var(--ink-2); margin-bottom: .5rem; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 14px; height: 14px; border-radius: 4px;
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 2px var(--teal);
}
.demo-actions { margin-top: auto; display: flex; gap: .75rem; align-items: center; }

/* ---- About ---- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.team-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .22s ease;
}
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.team-photo-wrap {
  position: relative;
  width: 76px; height: 76px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
  display: grid; place-items: center;
  color: #fff;
}
.team-photo-wrap.theo { background: linear-gradient(135deg, #22406b, #0c2233); }
.team-photo-wrap.t    { background: linear-gradient(135deg, #16394f, #1b2c4e); }
.team-photo-wrap.k    { background: linear-gradient(135deg, #2a4a78, #12203b); }
.team-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.team-initial { font-family: var(--font-head); font-weight: 600; font-size: 1.6rem; letter-spacing: .02em; }
.team-card h4 { font-size: 1.25rem; margin-bottom: 2px; }
.team-card .role { font-size: .86rem; color: var(--teal-deep); font-weight: 700; margin-bottom: .6rem; }
.team-card .role-note { color: var(--muted-2); font-weight: 500; }
.team-card p { font-size: .93rem; color: var(--muted); margin: 0; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.founder { display: flex; gap: 16px; margin-bottom: 28px; }
.founder-avatar {
  width: 58px; height: 58px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; color: #fff;
}
.founder-avatar.t { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%); }
.founder-avatar.p { background: linear-gradient(135deg, var(--ink-2) 0%, var(--teal-deep) 100%); }
.founder h4 { margin: 0 0 2px; font-size: 1.15rem; }
.founder .role { font-size: .85rem; color: var(--teal-deep); font-weight: 600; margin-bottom: .4rem; }
.founder p { font-size: .95rem; color: var(--muted); margin: 0; }
.about-why {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.about-why h3 { font-size: 1.3rem; }
.about-why ul { padding-left: 0; list-style: none; margin: 1rem 0 0; }
.about-why li { position: relative; padding-left: 30px; margin-bottom: .9rem; color: var(--ink-2); font-size: .96rem; }
.about-why li svg { position: absolute; left: 0; top: 2px; color: var(--teal); }

/* ---- Contact ---- */
#contact { background: var(--ink); color: #dfe8ee; }
#contact h2 { color: #fff; }
#contact .section-head p { color: #a9bcc8; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.contact-info h3 { color: #fff; font-size: 1.4rem; }
.contact-info p { color: #a9bcc8; }
.contact-line { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; color: #dfe8ee; }
.contact-line svg { color: #6f9bd1; flex: none; }
.contact-line a { color: #dfe8ee; }
.contact-line a:hover { color: #fff; }

.process-steps { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); }
.process-step { display: flex; gap: 14px; margin-bottom: 18px; }
.process-step:last-child { margin-bottom: 0; }
.process-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(111,155,209,.16); color: #8fb4de;
  display: grid; place-items: center;
  font-weight: 700; font-size: .82rem; font-family: var(--font-body);
}
.process-step strong { display: block; color: #fff; font-size: .95rem; margin-bottom: 2px; }
.process-step span { color: #a9bcc8; font-size: .87rem; }
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--font-body); font-size: .96rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27,44,78,.18);
  background: #fff;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success {
  display: none;
  background: var(--teal-soft);
  border: 1px solid var(--teal);
  color: var(--teal-deep);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .92rem;
  margin-bottom: 16px;
}
.form-success.show { display: block; }
.form-error {
  display: none;
  background: #f6ded6;
  border: 1px solid #b0563e;
  color: #a34428;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .92rem;
  margin-bottom: 16px;
}
.form-error a { color: #a34428; text-decoration: underline; }
.form-error.show { display: block; }
.form-privacy {
  font-size: .8rem;
  color: var(--muted-2);
  text-align: center;
  margin: 12px 0 0;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: #8ba0ad;
  padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-inner .brand { color: #fff; }
.footer-inner .brand-word { color: #fff; }
.footer-inner a { color: #8ba0ad; }
.site-footer small { font-size: .85rem; }
.footer-brand-row { display: flex; align-items: center; gap: 16px; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); color: #8ba0ad;
  transition: color .15s ease, border-color .15s ease;
}
.social-link:hover { color: #fff; border-color: rgba(255,255,255,.4); text-decoration: none; }

/* ---- Reveal-on-scroll ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  section { padding: 72px 0; }
  .hero { padding: 72px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 420px; }
  .cards, .demo-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; }
  .nav-toggle { display: block; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
}
