/* =========================================================
   TEXCILA WEBSITE - styles.css
   Design tokens copied from TexMeasure styles.py so every
   Texcila tool shares one look. Change them HERE only.
   ========================================================= */

   :root {
    --bg: #F5F0E8;
    --surface: #FDFBF5;
    --surface2: #EDE8DC;
    --border: #D4C9B0;
    --text: #1C1A16;
    --text-muted: #6B5E4E;
    --text-faint: #A0907C;
    --green: #0B724B;
    --green-dark: #085C3C;
    --green-light: #E8F2EC;
    --gold: #D7C06C;
    --gold-deep: #B8962E;
    --shadow-sm: 0 1px 3px rgba(28,26,22,0.08);
    --shadow-md: 0 4px 16px rgba(28,26,22,0.10);
    --shadow-lg: 0 8px 32px rgba(28,26,22,0.12);
  
    --font-heading: "Cormorant Garamond", Georgia, serif;
    --font-body: "DM Sans", Arial, sans-serif;
  
    --side-space: max(1.5rem, calc((100vw - 1100px) / 2));
  }
  
  /* ---------- Reset ---------- */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: var(--font-body); font-weight: 300; color: var(--text);
    line-height: 1.75; -webkit-font-smoothing: antialiased;
    background-color: var(--bg);
    background-image:
      radial-gradient(ellipse at 0% 0%, rgba(11,114,75,0.05) 0%, transparent 55%),
      radial-gradient(ellipse at 100% 100%, rgba(215,192,108,0.07) 0%, transparent 55%);
  }
  img { max-width: 100%; display: block; }
  a { color: inherit; text-decoration: none; }
  ul { list-style: none; }
  [hidden] { display: none !important; }
  h1, h2, h3 { font-family: var(--font-heading); font-weight: 300; line-height: 1.15; }
  p + p { margin-top: 1rem; }
  
  /* ---------- Shared small pieces ---------- */
  .eyebrow {
    font-size: 10px; font-weight: 600; letter-spacing: 0.45em;
    text-transform: uppercase; color: var(--green); margin-bottom: 14px;
  }
  .gold-rule { width: 40px; height: 2px; background: var(--gold); margin: 20px 0 24px; }
  h2 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: 0.03em; margin-bottom: 1rem; }
  
  /* ---------- Buttons (gold with green text, like TexMeasure) ---------- */
  .btn-primary, .btn-secondary {
    display: inline-block; border-radius: 1px; cursor: pointer;
    font-family: var(--font-body); font-size: 11px; font-weight: 700;
    letter-spacing: 0.3em; text-transform: uppercase;
    padding: 16px 32px; transition: all 0.25s ease;
  }
  .btn-primary {
    background: var(--gold); color: var(--green); border: none;
    box-shadow: 0 4px 20px rgba(215,192,108,0.35);
  }
  .btn-primary:hover { background: #C9AE58; transform: translateY(-1px); box-shadow: 0 6px 28px rgba(215,192,108,0.5); }
  .btn-primary:disabled { background: var(--border); color: var(--text-faint); box-shadow: none; transform: none; cursor: default; }
  .btn-secondary { border: 1px solid var(--green); color: var(--green); background: transparent; }
  .btn-secondary:hover { background: var(--green); color: #fff; }
  .btn-disabled { opacity: 0.5; cursor: default; }
  .btn-disabled:hover { background: transparent; color: var(--green); }
  
  /* ---------- Navigation ---------- */
  .site-header { position: sticky; top: 0; z-index: 100; background: var(--green-dark); }
  .navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.6rem var(--side-space);
  }
  .logo img { height: 72px; width: auto; }
  .nav-links {
    display: flex; gap: 2rem; align-items: center; color: #F5F0E8;
    font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  }
  .nav-links a:hover { color: var(--gold); }
  .nav-cta {
    background: var(--gold); color: var(--green); padding: 12px 22px; border-radius: 1px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase;
  }
  .nav-cta:hover { background: #C9AE58; }
  
  .dropdown { position: relative; padding: 1rem 0; }
  .dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0; min-width: 190px;
    background: var(--green-dark); border-top: 2px solid var(--gold);
    padding: 0.5rem 0; box-shadow: var(--shadow-lg);
  }
  .dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: block; }
  .dropdown-menu a { display: block; padding: 0.7rem 1.2rem; }
  
  /* ---------- Hero: true split screen ---------- */
  .hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 80vh; }
  .hero-content {
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    padding: 5rem 3rem 5rem var(--side-space);
  }
  .hero h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); letter-spacing: 0.02em; color: var(--text); }
  .hero-subhead { font-size: 1.05rem; color: var(--text-muted); max-width: 520px; margin-bottom: 2rem; }
  
  /* Right half runs edge to edge, so screenshots and video get real space */
  .hero-slideshow {
    position: relative; overflow: hidden; min-height: 100%;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
  }
  .slide {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity 1s ease;
  }
  .slide.active { opacity: 1; }
  .slide-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.5rem; text-align: center; color: var(--gold);
  }
  .slide-placeholder span { font-family: var(--font-heading); font-size: 3rem; letter-spacing: 0.1em; }
  .slide-placeholder small { font-size: 0.9rem; color: #F5F0E8; }
  
  /* ---------- Sections ---------- */
  .problem, .platform, .resources, .mission { padding: 5rem var(--side-space); }
  
  .problem { text-align: center; background: var(--surface); font-size: 1.2rem; color: var(--text-muted); }
  .problem p { max-width: 760px; margin-left: auto; margin-right: auto; }
  .problem .emphasis { font-family: var(--font-heading); font-size: 2rem; font-weight: 400; font-style: italic; color: var(--green); }
  
  /* Platform cards: green top border, like TexMeasure feature cards */
  .platform { background: var(--surface2); }
  .tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 2rem; margin-top: 2rem; }
  .tool-card {
    background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--green);
    border-radius: 2px; padding: 2rem; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
    transition: box-shadow 0.2s ease;
  }
  .tool-card:hover { box-shadow: var(--shadow-md); }
  .tool-card h3 { font-size: 2rem; color: var(--text); }
  .tool-card p { font-size: 0.95rem; color: var(--text-muted); }
  .tag { font-size: 9px; font-weight: 700; letter-spacing: 0.25em; padding: 4px 10px; border-radius: 1px; }
  .tag-live { background: var(--green); color: #fff; }
  .tag-soon { background: var(--gold); color: var(--text); }
  
  /* Free resource: split, info left and form card right */
  .resources { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
  .resource-sub { font-family: var(--font-heading); font-size: 1.3rem; font-style: italic; color: var(--gold-deep); margin-bottom: 1.2rem; }
  .check-list li { font-size: 0.95rem; color: var(--text-muted); line-height: 2; }
  .check-list li::before { content: "✦"; color: var(--gold-deep); margin-right: 12px; }
  .fine-print { font-size: 12px; color: var(--text-faint); font-style: italic; margin-top: 1rem; }
  
  .resource-card {
    background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--green);
    border-radius: 2px; padding: 2rem; box-shadow: var(--shadow-md);
  }
  .email-signup label {
    display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--text-muted); margin: 1rem 0 0.4rem;
  }
  .email-signup input[type="text"], .email-signup input[type="email"] {
    width: 100%; padding: 10px 12px; font-family: var(--font-body); font-size: 14px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-bottom: 2px solid var(--green); border-radius: 2px;
  }
  .email-signup input:focus { outline: none; border-bottom-color: var(--gold-deep); }
  .email-signup button { width: 100%; margin-top: 1.5rem; }
  .signup-message { font-size: 13px; color: var(--text-muted); margin-top: 0.8rem; }
  .success-title { font-family: var(--font-heading); font-size: 2rem; color: var(--green); margin-bottom: 0.5rem; }
  #signup-success .btn-primary { margin-top: 1.2rem; width: 100%; text-align: center; }
  
  /* Mission */
  .mission { background: var(--surface); }
  .mission p:not(.eyebrow) { max-width: 720px; color: var(--text-muted); }
  
  /* ---------- Footer ---------- */
  .site-footer { background: var(--surface2); border-top: 1px solid var(--border); padding: 3rem var(--side-space) 2rem; }
  .footer-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 2rem; }
  .footer-brand { font-family: var(--font-heading); font-size: 1.6rem; letter-spacing: 0.1em; }
  .footer-tag { font-size: 12px; color: var(--text-faint); margin: 4px 0 14px; }
  .footer-tag a { color: var(--green); }
  .social-icons { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
  .social-icons img { width: 28px; height: 28px; object-fit: contain; opacity: 0.75; transition: opacity 0.2s; }
  .social-icons a:hover img { opacity: 1; }
  .footer-label { font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
  .footer-tools li { font-size: 13px; color: var(--text-muted); line-height: 1.9; }
  .footer-tools .muted { color: var(--border); }
  .footer-caption { font-size: 11.5px; color: var(--text-faint); margin-top: 2rem; }
  
  /* ---------- Chat button (button only for now) ---------- */
  .chat-toggle {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 200;
    width: 58px; height: 58px; border-radius: 50%; border: none;
    background: var(--gold); font-size: 1.6rem; cursor: pointer;
    box-shadow: var(--shadow-lg); transition: transform 0.2s;
  }
  .chat-toggle:hover { transform: scale(1.08); }
  
  /* ---------- Tablets and phones ---------- */
  @media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-content { padding: 3rem 1.5rem; }
    .hero-slideshow { aspect-ratio: 4 / 3; min-height: 0; }
    .resources { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .navbar { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
    .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .logo img { height: 56px; }
  }

  /* ---------- Added for shared header, tools dropdown, footer fallback ---------- */

/* The header now sits inside #site-header, so THAT box must be the sticky one */
#site-header { position: sticky; top: 0; z-index: 100; }
.site-header { position: static; }

.dropdown-menu { min-width: 250px; }
.menu-group {
  padding: 0.8rem 1.2rem 0.2rem; font-size: 9px; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold);
}
.menu-soon { display: block; padding: 0.7rem 1.2rem; opacity: 0.55; cursor: default; }
.menu-soon small { font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-left: 6px; }

/* If a social icon file is missing, its name shows as green text */
.social-icons a { font-size: 12px; color: var(--green); }

/* Hero label: bigger, bolder, dark green */
.hero .eyebrow,
.hero .hero-eyebrow,
.hero-content > p:first-child {
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.28em !important;
  color: var(--green-dark) !important;
}

/* ---------- Inner pages (About, Contact) ---------- */
.page-hero { padding: 4.5rem var(--side-space) 3.5rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); letter-spacing: 0.02em; max-width: 820px; }
.page-lead { font-size: 1.1rem; color: var(--text-muted); max-width: 680px; }

.content-section { padding: 4rem var(--side-space); }
.content-section.alt { background: var(--surface2); }
.content-section p:not(.eyebrow):not(.button-row) { max-width: 720px; color: var(--text-muted); }
.content-section strong { color: var(--text); font-weight: 600; }
.button-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- Contact: FAQ + form ---------- */
.contact-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; padding: 4rem var(--side-space); align-items: start; }

.faq-block details { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 2px; padding: 1rem 1.2rem; margin-bottom: 0.8rem; }
.faq-block summary { cursor: pointer; font-weight: 500; color: var(--text); list-style: none; }
.faq-block summary::-webkit-details-marker { display: none; }
.faq-block summary::after { content: "+"; float: right; color: var(--gold-deep); font-size: 1.3rem; line-height: 1; }
.faq-block details[open] summary::after { content: "–"; }
.faq-block details p { margin-top: 0.8rem; font-size: 0.95rem; color: var(--text-muted); }

/* Extra form fields share the signup form's look */
.email-signup select, .email-signup textarea {
  width: 100%; padding: 10px 12px; font-family: var(--font-body); font-size: 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-bottom: 2px solid var(--green); border-radius: 2px;
}
.email-signup textarea { resize: vertical; }
.email-signup select:focus, .email-signup textarea:focus { outline: none; border-bottom-color: var(--gold-deep); }

/* ---------- Chatbot panel ---------- */
.chat-panel {
  position: fixed; right: 1.5rem; bottom: 6rem; z-index: 200;
  width: min(360px, calc(100vw - 2rem)); max-height: 70vh;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--green);
  border-radius: 2px; box-shadow: var(--shadow-lg);
}
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1rem; background: var(--green-dark); color: var(--gold); letter-spacing: 0.1em; }
.chat-close { background: none; border: none; color: var(--gold); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem; min-height: 160px; display: flex; flex-direction: column; gap: 0.6rem; }
.chat-msg { max-width: 88%; padding: 0.6rem 0.9rem; border-radius: 2px; font-size: 13.5px; line-height: 1.6; }
.chat-msg.bot { background: var(--surface2); color: var(--text); align-self: flex-start; }
.chat-msg.user { background: var(--green); color: #fff; align-self: flex-end; }
.chat-msg a { color: var(--green); font-weight: 600; text-decoration: underline; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.8rem; }
.chat-suggestions button {
  background: transparent; border: 1px solid var(--green); color: var(--green);
  font-family: var(--font-body); font-size: 12px; padding: 5px 10px; border-radius: 1px; cursor: pointer;
}
.chat-suggestions button:hover { background: var(--green); color: #fff; }
.chat-input { display: flex; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; border: none; padding: 0.8rem 1rem; font-family: var(--font-body); font-size: 14px; background: var(--surface); }
.chat-input input:focus { outline: none; }
.chat-input button {
  border: none; background: var(--gold); color: var(--green);
  font-weight: 700; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; padding: 0 1.1rem; cursor: pointer;
}

@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; gap: 2rem; }
}

/* TexPivot section on the About page */
.sub-heading { font-size: 1.6rem; margin: 2.5rem 0 1rem; color: var(--green-dark); }
.content-section .tool-cards { margin-top: 1rem; }
.content-section .check-list li { max-width: 720px; }
.content-section .fine-print { max-width: 720px; }
#texpivot { scroll-margin-top: 90px; }

/* Privacy policy and form notes */
.legal h2 { font-size: 1.6rem; margin: 2.5rem 0 0.8rem; color: var(--green-dark); }
.legal h2:first-child { margin-top: 0; }
.legal ul { margin: 0.5rem 0 1rem 1.2rem; list-style: disc; max-width: 720px; color: var(--text-muted); }
.legal li { margin-bottom: 0.5rem; }
.legal a { color: var(--green); text-decoration: underline; }
.footer-caption a { color: var(--green); }
.form-note { font-size: 12px; color: var(--text-faint); margin-top: 0.8rem; line-height: 1.6; }
.form-note a { color: var(--green); text-decoration: underline; }