/* TerraSun Software: sunrise over a valley. */
:root {
  --night: #0B2540;
  --deep: #1B4965;
  --teal: #2A9D8F;
  --teal-dark: #1D6F66;
  --sun: #FFB703;
  --sun-light: #FFD166;
  --ember: #F77F00;
  --coral: #E76F51;
  --sand: #FBF7EF;
  --ink: #14212E;
  --muted: #4A5B6B;
  --line: #E6DFD0;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(11, 37, 64, .10);
  --font-head: "Outfit", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 400 17px/1.65 var(--font-body); color: var(--ink); background: var(--sand); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--deep); }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--night); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.5em; border-radius: 999px; font: 600 1rem var(--font-head); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-sun { background: linear-gradient(135deg, var(--sun-light), var(--sun) 50%, var(--ember)); color: var(--night); box-shadow: 0 8px 24px rgba(247, 127, 0, .35); }
.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-dark { background: var(--night); color: #fff; }
.btn-sm { padding: .55em 1.1em; font-size: .95rem; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .25s, box-shadow .25s; }
.site-header.scrolled { background: rgba(11, 37, 64, .92); backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0, 0, 0, .2); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-name { font: 700 1.3rem var(--font-head); letter-spacing: -.01em; }
.brand-name span { font-weight: 400; opacity: .8; margin-left: .3em; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: #fff; text-decoration: none; font-weight: 500; opacity: .9; }
.site-nav a:not(.btn):hover { opacity: 1; color: var(--sun-light); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }

/* Hero */
.hero { --land: clamp(210px, 30vw, 520px); position: relative; isolation: isolate; min-height: min(100svh, 940px); display: flex; align-items: center; color: #fff; overflow: hidden; padding: 120px 0 calc(var(--land) + 8px); background: linear-gradient(180deg, var(--night) 0%, var(--deep) 45%, #7A5A6E 72%, var(--coral) 86%, var(--sun) 100%); }
.hero-stars { position: absolute; inset: 0 0 auto; width: 100%; height: 300px; z-index: -1; }
.hero-land { position: absolute; inset: auto 0 0; width: 100%; height: var(--land); z-index: -1; }
.hero-content { position: relative; max-width: 1160px; text-align: center; }
.hero-content h1 { max-width: 15ch; margin-inline: auto; text-shadow: 0 2px 30px rgba(11, 37, 64, .5); }
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 38em; margin: 0 auto 2em; opacity: .95; text-shadow: 0 1px 12px rgba(11, 37, 64, .6); }
.eyebrow { font: 600 .85rem var(--font-head); text-transform: uppercase; letter-spacing: .14em; color: var(--sun-light); margin-bottom: 1em; }
.eyebrow.dark { color: var(--teal-dark); }
.glow-text { background: linear-gradient(90deg, var(--sun-light), var(--sun), var(--coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero .sun { animation: rise 2.8s cubic-bezier(.2, .7, .2, 1) both; }
.hero .rays { transform-origin: 720px 205px; animation: spin 90s linear infinite, pulse 6s ease-in-out 2.8s infinite; }
.hero .sun-glow { transform-origin: 720px 205px; animation: shine 5s ease-in-out 2.8s infinite; }
.hero .sun-corona { transform-origin: 720px 205px; animation: shine 5s ease-in-out 3.6s infinite; }
.hero-stars { animation: fade-out 3s ease-out both; }
@keyframes rise { from { transform: translateY(200px); } to { transform: translateY(0); } }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shine { 50% { opacity: .6; transform: scale(1.08); } }
@keyframes fade-out { from { opacity: 1; } to { opacity: .15; } }

/* Strip */
.strip { background: var(--night); color: #cfe0ea; }
.strip-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 0; text-align: center; }
.strip p { margin: 0; font-size: .95rem; }
.strip strong { color: var(--sun-light); font-family: var(--font-head); }

/* Sections */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-tint { background: #F3EBDD; }
.section-dark { background: linear-gradient(180deg, var(--night), var(--deep)); color: #fff; }
.section-sunrise { background: linear-gradient(160deg, var(--sun-light), var(--sun) 45%, var(--coral)); color: var(--night); }
.section-lede { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin-bottom: 2.5em; }
.section-sunrise .section-lede { color: var(--night); opacity: .85; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }

/* Cards */
.cards { display: grid; gap: 24px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(11, 37, 64, .14); }
.card .icon { width: 48px; height: 48px; color: var(--teal); margin-bottom: 18px; padding: 0; }
.card p { color: var(--muted); margin: 0; }

/* Free tools (#17) */
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.tool-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(11, 37, 64, .14); }
.tool-card p { color: var(--muted); flex: 1; }
.tool-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--night); margin-bottom: 18px; }
.tool-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--sun-light); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-go { font: 600 1rem var(--font-head); color: var(--teal-dark); }
.site-nav .ts-tools-menu a:not(.btn) { width: auto; padding: 10px 12px; border: 0; color: inherit; opacity: 1; }
.site-nav .ts-tools-menu a:not(.btn):hover { color: inherit; }
.ts-tools-btn { font-size: 1rem; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.ticks li { position: relative; padding-left: 40px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%230B2540' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.ticks strong { color: var(--ink); }

/* Work mockups */
.work h3 { margin-top: 4px; }
.work > p:last-child { color: var(--muted); }
.tag { display: inline-block; margin: 18px 0 6px; font: 600 .75rem var(--font-head); text-transform: uppercase; letter-spacing: .1em; color: var(--teal-dark); background: #DDF1EE; padding: 4px 10px; border-radius: 999px; }
.mock { height: 230px; border-radius: var(--radius); background: linear-gradient(150deg, var(--deep), var(--night)); display: grid; place-items: center; overflow: hidden; box-shadow: var(--shadow); padding: 22px; }
.mock-browser { place-items: stretch; }
.mock-browser > .mock-bar { background: #e9eef2; border-radius: 10px 10px 0 0; height: 22px; display: flex; gap: 6px; align-items: center; padding: 0 10px; }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #c3ccd4; }
.mock-browser { display: flex; flex-direction: column; }
.mock-browser .mock-body { flex: 1; background: #fff; border-radius: 0 0 10px 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mock-hero { flex: 1; border-radius: 8px; background: linear-gradient(120deg, var(--coral), var(--sun)); color: #fff; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; font-size: .9rem; }
.mock-hero span { align-self: flex-start; background: #fff; color: var(--coral); font-weight: 600; font-size: .75rem; padding: 3px 10px; border-radius: 999px; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 46px; }
.mock-grid i { border-radius: 6px; background: #F3EBDD; }
.mock-phone .mock-body { width: 132px; height: 200px; background: #fff; border-radius: 22px; border: 6px solid #0a1a2b; padding: 14px 10px; display: flex; flex-direction: column; gap: 10px; font-size: .8rem; color: var(--ink); }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.slots i { font-style: normal; font-size: .7rem; text-align: center; padding: 4px 0; border-radius: 6px; background: #EEF3F6; }
.slots i.on { background: var(--teal); color: #fff; }
.salon span { margin-top: auto; text-align: center; background: var(--sun); border-radius: 999px; padding: 5px; font-weight: 600; font-size: .7rem; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpis i { font-style: normal; font-size: .7rem; color: var(--muted); background: #EEF3F6; border-radius: 6px; padding: 6px; }
.kpis b { display: block; font-size: 1rem; color: var(--ink); }
.bars { flex: 1; display: flex; align-items: flex-end; gap: 8px; padding-top: 6px; }
.bars i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(var(--teal), var(--teal-dark)); }

/* Process */
.steps { list-style: none; padding: 0; margin: 2.5em 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.steps li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 28px; }
.steps span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); color: var(--night); font: 700 1.2rem var(--font-head); margin-bottom: 16px; }
.steps p { color: #cfe0ea; margin: 0; }

/* About */
.about-art { display: grid; place-items: center; aspect-ratio: 1; max-width: 420px; border-radius: 50%; background: radial-gradient(circle, #FFE9B0, #F3EBDD 70%); }
.about-art img { width: 55%; height: auto; filter: drop-shadow(0 20px 30px rgba(11, 37, 64, .25)); }

/* Contact */
.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.contact-direct { font: 600 1.2rem var(--font-head); }
.contact:has(#contact-form[hidden]) { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.contact:has(#contact-form[hidden]) .section-lede { margin-inline: auto; }
.contact-direct a { color: var(--night); }
.contact-form { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 50px rgba(11, 37, 64, .2); display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.contact-form input, .contact-form textarea { font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--sand); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--teal); outline: none; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 600; }

/* Footer */
.site-footer { background: var(--night); color: #9fb6c6; padding: 40px 0; font-size: .95rem; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-row p { margin: 0; }
.slogan { font: italic 500 1.05rem var(--font-head); color: var(--sun-light); }

/* Scroll reveal (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 960px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-3, .steps { grid-template-columns: repeat(2, 1fr); }
  .strip-row { grid-template-columns: repeat(2, 1fr); }
}

/* Phone */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: 72px 0 auto; flex-direction: column; gap: 0; background: rgba(11, 37, 64, .97); padding: 8px 16px 20px; transform: translateY(-120%); transition: transform .25s; visibility: hidden; }
  .site-nav.open { transform: none; visibility: visible; }
  .site-nav a:not(.btn) { width: 100%; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .site-nav .btn { margin-top: 16px; width: 100%; }
  .nav-tools { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .nav-tools .ts-tools-menu { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .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); }
  .hero { padding: 110px 0 calc(var(--land) * .92); }
  .cards-4, .cards-3, .cards-2, .steps, .split, .contact { grid-template-columns: 1fr; }
  .about-art { max-width: 260px; margin-inline: auto; }
  .footer-row { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
