/* ============================================================
   Section + component styles. Loaded after styles.css.
   ============================================================ */

/* ---------- Hero (restrained, one bold moment) ---------- */
.hero {
  position: relative;
  padding-block: clamp(5rem, 14vw, 10rem);
  overflow: hidden;
}
/* Near-still, near-monochrome teal atmosphere. No busy effects. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 80% 0%, color-mix(in srgb, var(--seaglass) 28%, transparent), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 55%);
  z-index: -1;
}
.hero__inner { max-width: 42rem; }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 450;
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 17ch;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--teal); }
.hero__lead {
  font-size: var(--fs-lead);
  max-width: 44ch;
  color: var(--driftwood);
  margin-bottom: 2rem;
  text-wrap: pretty;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- One-line proposition ---------- */
.proposition {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proposition p {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.25;
  color: var(--ink);
  max-width: 30ch;
  margin: 0;
}
.proposition em { font-style: italic; color: var(--teal); }

/* ---------- Work: staggered fragments ---------- */
.work__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.work__head h2 { font-size: var(--fs-h2); margin: 0; }

.fragments { display: flex; flex-direction: column; gap: clamp(3rem, 8vw, 6rem); }

.fragment { position: relative; }
.fragment__label {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--driftwood);
  margin-bottom: 1rem;
}
.fragment__num { font-family: var(--serif); font-style: italic; color: var(--teal); text-transform: none; letter-spacing: 0; font-size: 1rem; }
.fragment__role { opacity: 0.75; }
.fragment__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  margin-top: 1rem;
}
.fragment__link:hover { color: var(--teal-hover); }
.fragment__link::after { content: "\2192"; transition: transform var(--dur) var(--ease); }
.fragment__link:hover::after { transform: translateX(4px); }
.fragment__blurb {
  margin: 1.1rem 0 0;
  max-width: 54ch;
  color: var(--driftwood);
  font-size: var(--fs-small);
  line-height: 1.65;
}

/* Stagger: nudge alternate fragments off-axis on wider screens. */
@media (min-width: 880px) {
  .fragment--offset-r { margin-left: auto; width: 78%; }
  .fragment--offset-l { width: 78%; }
}

/* image-hero (Japonica): simple full-bleed image + one line */
.frag-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--limewash);
  overflow: hidden;
  border-radius: var(--radius);
}
.frag-image img { width: 100%; height: 100%; object-fit: cover; }
.frag-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 28, 26, 0.5), rgba(28, 28, 26, 0) 48%);
  pointer-events: none;
  z-index: 1;
}
.frag-image__line {
  position: absolute;
  left: clamp(1.25rem, 4vw, 3rem);
  bottom: clamp(1.25rem, 4vw, 3rem);
  right: clamp(1.25rem, 4vw, 3rem);
  z-index: 2;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  color: var(--cloud);
  text-shadow: 0 1px 24px rgba(20, 20, 20, 0.35);
  max-width: 18ch;
}
.frag-placeholder {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(45deg, var(--limewash), var(--limewash) 12px, #e2d9ca 12px, #e2d9ca 24px);
  color: var(--driftwood);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-align: center;
  padding: 1rem;
}

/* identity (Alvo): live swatches + wordmark */
.frag-identity {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 340px;
  background: var(--ground, var(--ink));
}
.frag-identity__panel { padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.frag-identity__logo { width: clamp(150px, 28vw, 240px); height: auto; filter: brightness(0) invert(1); }
.frag-identity__tag { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: #f7f9fa; opacity: 0.92; margin: 0; }
.frag-identity__swatches { display: flex; flex-direction: column; }
.frag-identity__swatch { flex: 1; min-height: 84px; }
@media (max-width: 700px) {
  .frag-identity { grid-template-columns: 1fr; }
  .frag-identity__swatches { flex-direction: row; }
  .frag-identity__swatch { min-height: 56px; }
}

/* assistant (Foleo): scripted chat-style panel */
.frag-assistant {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  max-width: 560px;
}
.frag-assistant__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.1rem;
  background: var(--accent, var(--teal));
  color: var(--cloud);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.frag-assistant__icon {
  width: 26px;
  height: 26px;
  background: #fff;
  border-radius: 6px;
  padding: 3px;
  flex: none;
}
.frag-assistant__body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; min-height: 240px; }
.bubble {
  max-width: 80%;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-size: var(--fs-small);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.bubble[data-shown="true"] { opacity: 1; transform: none; }
.bubble--in { align-self: flex-start; background: var(--limewash); color: var(--driftwood); border-bottom-left-radius: 4px; }
.bubble--out { align-self: flex-end; background: var(--accent, var(--teal)); color: var(--cloud); border-bottom-right-radius: 4px; }

/* dark (Colab): deep contrast block */
.frag-dark {
  background: var(--bg, #0c0c1e);
  color: var(--cloud);
  border-radius: var(--radius);
  padding: clamp(2.5rem, 7vw, 5rem);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.frag-dark__word { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.5rem); margin: 0 0 0.75rem; }
.frag-dark__line { color: color-mix(in srgb, var(--cloud) 75%, transparent); max-width: 34ch; }
.frag-dark .fragment__link { color: var(--seaglass); }
.frag-dark .fragment__link:hover { color: #fff; }

/* portrait (HP): tall architectural image */
.frag-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 460px;
  background: var(--driftwood);
  border-radius: var(--radius);
  overflow: hidden;
}
.frag-portrait img { width: 100%; height: 100%; object-fit: cover; }
.frag-portrait__cap {
  position: absolute;
  left: 1.25rem; bottom: 1.25rem; right: 1.25rem;
  color: var(--cloud);
  font-size: var(--fs-small);
  text-shadow: 0 1px 16px rgba(0,0,0,0.4);
}

/* icons (bespoke craft) */
.frag-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.frag-icons__cell {
  background: var(--cloud);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.frag-icons__cell svg { width: 64px; height: 64px; color: var(--teal); }
@media (max-width: 600px) { .frag-icons { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Generic page intro ---------- */
.page-intro { padding-top: clamp(3rem, 8vw, 6rem); }
.page-intro h1 { font-size: var(--fs-hero); max-width: 16ch; }
.page-intro__lead { font-size: var(--fs-lead); max-width: 52ch; }

/* ---------- Services ---------- */
.tier-grid, .addon-grid, .plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.card h3 { font-size: var(--fs-h3); margin-bottom: 0.25rem; }
.card__price { font-family: var(--serif); font-style: italic; color: var(--teal); font-size: 1.25rem; margin-bottom: 1rem; }
.card p { font-size: var(--fs-small); }
.included {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.included ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; }
.included li { padding-left: 1.25rem; position: relative; font-size: var(--fs-small); }
.included li::before { content: "\2014"; position: absolute; left: 0; color: var(--teal); }
.included li strong { color: var(--ink); font-weight: 600; }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2rem; }
.process__step { border-top: 2px solid var(--teal); padding-top: 1rem; }
.process__num { font-family: var(--serif); font-style: italic; color: var(--teal); font-size: 1.1rem; }
.process__step h3 { font-size: 1.15rem; margin: 0.25rem 0 0.5rem; }
.process__step p { font-size: var(--fs-small); }

@media (max-width: 880px) {
  .tier-grid, .addon-grid, .plan-grid, .process { grid-template-columns: 1fr 1fr; }
  .included ul { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tier-grid, .addon-grid, .plan-grid, .process { grid-template-columns: 1fr; }
}

/* ---------- Forms (Contact) ---------- */
.form { max-width: 640px; margin-top: 2rem; display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: var(--fs-body);
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--driftwood);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
.field textarea { min-height: 140px; resize: vertical; }
.form__note { font-size: var(--fs-small); opacity: 0.8; }

/* ---------- Journal ---------- */
.posts { display: grid; gap: 1.5rem; margin-top: 2rem; }
.post-row { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.post-row a { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); text-decoration: none; }
.post-row a:hover { color: var(--teal); }
.post-row time { display: block; font-size: var(--fs-small); opacity: 0.7; margin-bottom: 0.4rem; }

/* ---------- Prose (legal, posts) ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--fs-h3); margin-top: 2.5rem; }
.prose p, .prose li { font-size: var(--fs-body); }
