/* ============================================================
   Portfolio de Carol Hitillambeau — warm earth editorial
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #f5efe4;          /* warm off-white paper */
  --bg-deep: #efe6d6;     /* slightly deeper paper for contrast zones */
  --ink: #2b1e14;         /* deep espresso */
  --ink-soft: #5c4a38;    /* muted espresso for body */
  --accent: #c25a37;      /* muted terracotta */
  --secondary: #6a7a4a;   /* soft moss green */
  --line: rgba(43, 30, 20, 0.14);
  --glow-y: 10%;
  --pad: 1.25rem;         /* horizontal page padding — mobile */
  --serif: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --sans: 'Open Sans', system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }

/* ---------- Scroll-following light glow ---------- */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% var(--glow-y), rgba(194, 90, 55, 0.10) 0, transparent 60%);
  transition: background 0.1s linear;
}

/* ---------- Layout shell ---------- */
#main { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  background: rgba(245, 239, 228, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  animation: slideDown 0.6s ease both;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  gap: clamp(0.6rem, 2vw, 1.6rem);
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0;
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.site-nav a:hover::after { width: 100%; }
.site-nav a:hover { color: var(--ink); }

/* ---------- Hero / Accueil ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  height: calc(100vh - 60px);
  padding: clamp(2rem, 6vw, 5rem) var(--pad);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
.hero-copy {
  padding: 1rem 0;
  position: relative;
  z-index: 2;
}
.hero-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1.2rem;
  animation: fadeUp 0.7s ease both;
  animation-delay: 0.12s;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(4rem, 18vw, 13rem);
  line-height: 0.85;
  letter-spacing: 0.01em;
  margin-bottom: -0.1em;
  color: var(--ink);
  animation: fadeUp 0.7s ease both;
  animation-delay: 0.24s;
}
.hero-title br { display: none; }
.hero-sub {
  margin-top: 1.6rem;
  max-width: 34ch;
  font-size: 1.05rem;
  color: var(--ink-soft);
  animation: fadeUp 0.7s ease both;
  animation-delay: 0.36s;
}
.hero-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.8rem 1.6rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 2px;
  transition: background 0.2s ease, transform 0.2s ease;
  animation: fadeUp 0.7s ease both;
  animation-delay: 0.48s;
}
.hero-cta:hover { background: #a94a2c; transform: translateY(-2px); }

.hero-image {
  position: relative;
  z-index: 1;
  background: var(--bg-deep);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem) clamp(2rem, 5vw, 4rem) 22%;
  display: flex;
  align-items: center;
  animation: fadeIn 0.9s ease both;
  animation-delay: 0.3s;
}
.hero-image img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 24px 60px -24px rgba(43, 30, 20, 0.45);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3.5rem, 8vw, 7rem) var(--pad);
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.section-intro {
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ---------- Expandable index (signature) ---------- */
.index {
  border-top: 1px solid var(--line);
}
.index-item {
  border-bottom: 1px solid var(--line);
}
.index-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 1.2rem;
  padding: 1.4rem 0.2rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}
.index-head::-webkit-details-marker { display: none; }
.index-head:hover { background: rgba(194, 90, 55, 0.05); }
.index-num {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--accent);
}
.index-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.index-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  white-space: nowrap;
}
.index-item[open] .index-head { background: rgba(106, 122, 74, 0.06); }
.index-body {
  padding: 0.2rem 0.2rem 2.2rem;
  max-width: 60ch;
}
.index-desc { color: var(--ink-soft); margin-bottom: 1.2rem; }
.index-desc em { color: var(--ink); font-style: italic; }
.index-sub {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin: 1.6rem 0 0.6rem;
}
.index-list {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}
.index-list li { margin-bottom: 0.4rem; }
.index-visuals {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1rem;
  margin: 1.4rem 0;
}
.index-visuals figure { margin: 0; }
.index-visuals img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 14px 34px -18px rgba(43, 30, 20, 0.4);
}
.index-visuals figcaption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}
.index-links { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-top: 1.2rem; }
.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.link:hover { border-bottom-color: var(--accent); }

/* ---------- À propos ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.about-text p { color: var(--ink-soft); margin-bottom: 1.1rem; }
.about-text p:first-child { color: var(--ink); font-size: 1.1rem; }
.skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.skills-list li {
  padding: 0.6rem 0.9rem;
  background: var(--bg-deep);
  border-left: 3px solid var(--secondary);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
}
.service {
  padding: 1.6rem;
  background: var(--bg-deep);
  border-radius: 4px;
  border-top: 3px solid var(--accent);
}
.service-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.service p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Réflexions ---------- */
.reflexions-list {
  display: grid;
  gap: 1.4rem;
}
.reflexion {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.reflexion-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.reflexion-meta {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.6rem;
}
.reflexion p:last-child { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-form {
  display: grid;
  gap: 1.1rem;
  max-width: 520px;
  margin-bottom: 2rem;
}
.field { display: grid; gap: 0.35rem; }
.field label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.field input,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 90, 55, 0.18);
}
.btn {
  justify-self: start;
  padding: 0.8rem 1.8rem;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--accent); }
.form-status { font-size: 0.9rem; color: var(--secondary); font-weight: 600; }
.contact-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.attribution { font-size: 0.8rem; opacity: 0.7; }
.attribution a { color: var(--ink-soft); text-decoration: none; }
.attribution a:hover { color: var(--accent); }

/* ---------- Page-load orchestration (one-shot) ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    padding-top: 2.5rem;
  }
  .hero-title { font-size: clamp(3.4rem, 16vw, 6rem); }
  .hero-title br { display: inline; }
  .hero-copy { order: 1; }
  .hero-image {
    order: 2;
    clip-path: none;
    padding: 1.5rem;
  }
  .about-grid { grid-template-columns: 1fr; }
  .index-head { grid-template-columns: auto 1fr; }
  .index-tag { grid-column: 2; }
  .index-visuals { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .site-nav { width: 100%; }
}

/* ---------- Desktop padding ---------- */
@media (min-width: 821px) {
  :root { --pad: 3rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
