/*
Theme Name: Determined
Theme URI: https://determined.com
Author: Determined
Author URI: https://determined.com
Description: A single-page theme built around one word. A hero statement, a short essay on resolve, and a simple way to get in touch. Includes Open Graph/Twitter cards, a favicon set, and basic structured data out of the box.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: determined
Tags: one-column, custom-colors, translation-ready
*/

/* -------------------------------------------------
   Tokens
------------------------------------------------- */
:root {
  --ink: #17140f;
  --ink-soft: #211d17;
  --ink-raised: #26211a;
  --paper: #f4efe4;
  --paper-dim: #cfc8b8;
  --muted: #948c78;
  --ember: #c1652f;
  --ember-bright: #e08144;
  --ember-soft: rgba(193, 101, 47, 0.16);
  --line: #3a352b;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max: 1080px;
  --max-narrow: 760px;
  --space: clamp(1.25rem, 3vw, 2.5rem);
  --section-pad: clamp(4rem, 10vw, 8rem);
}

/* -------------------------------------------------
   Reset (minimal)
------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

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

a { color: inherit; }

::selection { background: var(--ember); color: var(--ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ember);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  left: 0;
}

/* Faint film-grain texture over the whole page for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 1; }

/* -------------------------------------------------
   Layout helpers
------------------------------------------------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--space);
  padding-right: var(--space);
}

.wrap--narrow { max-width: var(--max-narrow); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

/* -------------------------------------------------
   Scroll-reveal system (progressive enhancement)
   Content is fully visible with no JS; once js-enhanced
   is present, .reveal items animate in on scroll.
------------------------------------------------- */
.reveal {
  opacity: 1;
  transform: none;
}

.js-enhanced .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
}

.js-enhanced .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-enhanced .reveal { opacity: 1; transform: none; transition: none; }
}

/* -------------------------------------------------
   Hero
------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--space) * 2) var(--space);
  position: relative;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__eyebrow {
  opacity: 0;
  animation: fadeUp 0.7s ease 0.05s forwards;
}

.hero__word-wrap {
  position: relative;
}

.hero__word-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--ember-soft) 0%, rgba(193,101,47,0) 65%);
  filter: blur(10px);
  z-index: -1;
  animation: glow 6s ease-in-out infinite;
}

.hero__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.2rem, 13vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--paper);
}

.hero__word .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em) rotate(1deg);
  animation: letterIn 0.7s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--i) * 45ms + 150ms);
}

.hero__mark {
  width: 120px;
  height: 14px;
  margin: 1.5rem auto 1.75rem;
  display: block;
  overflow: visible;
}

.hero__mark path {
  fill: none;
  stroke: var(--ember);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  animation: draw 1s 0.75s cubic-bezier(.65,0,.35,1) forwards;
}

.hero__sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--paper-dim);
  max-width: 30ch;
  margin: 0 0 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.05s forwards;
}

.hero__body {
  max-width: 46ch;
  color: var(--paper-dim);
  font-size: 1.05rem;
  margin: 0;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.2s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space);
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.5s forwards;
}

.hero__scroll svg {
  width: 14px;
  height: 20px;
  stroke: var(--muted);
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes letterIn {
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes glow {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Ambient rising embers */
.hero__embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.ember-particle {
  position: absolute;
  bottom: -5%;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  background: var(--ember-bright);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 6px 1px var(--ember-soft);
  animation: emberRise var(--dur) linear var(--delay) infinite;
}

@keyframes emberRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: 0.85; }
  55% { transform: translateY(-55vh) translateX(12px); opacity: 0.45; }
  100% { transform: translateY(-100vh) translateX(-8px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__embers { display: none; }
  .hero__word-wrap::before { animation: none; }
  .hero__eyebrow, .hero__sub, .hero__body, .hero__scroll { opacity: 1; animation: none; }
  .hero__word .letter { opacity: 1; transform: none; animation: none; }
  .hero__mark path { animation: none; stroke-dashoffset: 0; }
  .hero__scroll svg { animation: none; }
}

/* -------------------------------------------------
   Section shell
------------------------------------------------- */
.section {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--line);
  position: relative;
}

/* -------------------------------------------------
   Essay
------------------------------------------------- */
.essay__lead {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.55;
  color: var(--paper);
  margin: 0 0 2rem;
}

.essay__lead::first-letter {
  font-size: 3.4em;
  font-weight: 900;
  float: left;
  line-height: 0.8;
  padding: 0.05em 0.09em 0 0;
  color: var(--ember);
}

.essay__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.35;
  color: var(--paper);
  border-left: 2px solid var(--ember);
  padding-left: 1.5rem;
  margin: 3rem 0;
  max-width: 34ch;
}

.essay__body {
  color: var(--paper-dim);
  font-size: 1.05rem;
  max-width: 62ch;
  margin: 0 0 1.4rem;
}

/* -------------------------------------------------
   Difference (contrast) list
------------------------------------------------- */
.diff__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2.5rem;
}

.diff__cell {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.diff__term {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.diff__cell--not .diff__term { color: var(--muted); }

.diff__cell--is .diff__term {
  color: var(--paper);
  position: relative;
}

.diff__cell--is .diff__term::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--ember);
  margin-top: 0.5rem;
}

.diff__desc {
  display: block;
  color: var(--paper-dim);
  font-size: 0.95rem;
  max-width: 32ch;
}

@media (max-width: 620px) {
  .diff__grid { grid-template-columns: 1fr; gap: 0; }
  .diff__cell--is { border-top: none; padding-top: 0.35rem; margin-bottom: 0.5rem; }
}

/* -------------------------------------------------
   Vignettes
------------------------------------------------- */
.vignettes__list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.vignettes__list li {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: 1.05rem;
  max-width: 62ch;
}

.vignettes__list li:last-child { border-bottom: 1px solid var(--line); }

.vignettes__mark {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  margin-top: 0.55em;
}

/* -------------------------------------------------
   Mantra
------------------------------------------------- */
.mantra {
  text-align: center;
  padding: calc(var(--section-pad) * 1.15) 0;
}

.mantra__text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  line-height: 1.2;
  margin: 0;
  color: var(--paper);
}

.mantra__text em {
  font-style: normal;
  color: var(--ember);
}

/* -------------------------------------------------
   Contact section
------------------------------------------------- */
.contact .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--space) * 2);
}

@media (min-width: 780px) {
  .contact .wrap {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }
}

.contact__intro h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 0.85rem;
}

.contact__intro p {
  color: var(--paper-dim);
  max-width: 40ch;
  margin: 0 0 1.75rem;
}

.contact__email {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  font-weight: 600;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--ember);
  padding-bottom: 0.15rem;
}

.contact__email:hover { color: var(--ember); }

.contact__email-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

/* -------------------------------------------------
   Form
------------------------------------------------- */
.form { display: grid; gap: 1.1rem; }

.form__row {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 480px) {
  .form__row--split {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field .optional {
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}

.field input,
.field textarea {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
}

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

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ember);
  background: var(--ink-raised);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit {
  appearance: none;
  border: 1px solid var(--ember);
  background: var(--ember);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 0.85rem 1.6rem;
  border-radius: 4px;
  cursor: pointer;
  justify-self: start;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.submit:hover {
  background: transparent;
  color: var(--ember);
  transform: translateY(-1px);
}

.submit:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.notice {
  border-radius: 4px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  margin: 0 0 0.4rem;
}

.notice--success {
  background: rgba(193, 101, 47, 0.14);
  border: 1px solid var(--ember);
  color: var(--paper);
}

.notice--error {
  background: rgba(193, 60, 47, 0.12);
  border: 1px solid #a4402f;
  color: var(--paper);
}

/* -------------------------------------------------
   Footer
------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.site-footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--paper-dim);
  font-size: 1rem;
  margin: 0 0 1rem;
}

.site-footer__meta { margin: 0; }
