/* ============================================================
   Matcharlie — subtle tea-themed portfolio draft
   Palette: warm cream · deep matcha ink · muted matcha accent
   ============================================================ */

:root {
  --cream:      #F6F1E7;
  --paper:      #FDFAF3;
  --ink:        #22301F;
  --ink-soft:   #4A5844;
  --matcha:     #6E7F4E;
  --matcha-deep:#4E5C38;
  --sage:       #A9B48C;
  --mist:       #E3E8D4;
  --amber:      #C98A4B;
  --line:       rgba(34, 48, 31, 0.14);

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle film grain */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain-shift 1.2s steps(4) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-2%,1%); }
  50%  { transform: translate(1%,-2%); }
  75%  { transform: translate(-1%,2%); }
  100% { transform: translate(2%,-1%); }
}

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

/* ---------------- nav ---------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--pad);
  transition: background .3s ease, box-shadow .3s ease;
}
.site-nav.scrolled {
  background: rgba(246, 241, 231, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.brand {
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; color: var(--ink);
}
.brand-mark { font-size: 1.1rem; transform: translateY(-1px); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .01em;
  position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--matcha);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta {
  color: var(--cream) !important;
  background: var(--ink);
  padding: .55rem 1.15rem;
  border-radius: 999px;
  transition: background .3s ease;
}
.nav-cta:hover { background: var(--matcha-deep); }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem var(--pad) 5rem;
  overflow: hidden;
}

.enso {
  position: absolute;
  right: -6rem; top: 8%;
  width: clamp(280px, 38vw, 560px);
  color: var(--mist);
  opacity: .9;
  z-index: 0;
  animation: spin-slow 60s linear infinite;
}
.enso svg { width: 100%; height: auto; display: block; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

.steam {
  position: absolute;
  left: clamp(1.5rem, 6vw, 6rem);
  bottom: 12%;
  width: 120px;
  color: var(--sage);
  opacity: .8;
  z-index: 0;
}
.steam path {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: steam 5s ease-in-out infinite;
}
.steam .s2 { animation-delay: 1.2s; }
.steam .s3 { animation-delay: 2.4s; }
@keyframes steam {
  0%   { stroke-dashoffset: 120; opacity: 0; }
  30%  { opacity: .9; }
  70%  { opacity: .5; }
  100% { stroke-dashoffset: -40; opacity: 0; }
}

.hero-eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--matcha);
  margin-bottom: 1.25rem;
  z-index: 1;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(2.6rem, 7.2vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  z-index: 1;
}
.hero-title .line { display: block; }
.hero-title em {
  font-style: italic;
  font-weight: 420;
  color: var(--matcha-deep);
}
.hero-sub {
  max-width: 34rem;
  margin-top: 1.6rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 300;
  z-index: 1;
}
.hero-actions {
  display: flex;
  gap: .9rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
  z-index: 1;
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn-solid { background: var(--ink); color: var(--cream); }
.btn-solid:hover { background: var(--matcha-deep); transform: translateY(-2px); }
.btn-ghost { color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--matcha); color: var(--matcha-deep); transform: translateY(-2px); }

/* ---------------- sections ---------------- */
.section { padding: 6.5rem var(--pad); }
.section-head { margin-bottom: 2.75rem; }
.section-index {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .25em;
  color: var(--matcha);
  margin-bottom: .6rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  letter-spacing: -0.01em;
}
.section-head h2 em { font-style: italic; color: var(--matcha-deep); }

/* ---------------- showreel ---------------- */
.showreel { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reel-frame {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 120% at 15% 15%, #DDE5C8 0%, transparent 45%),
    radial-gradient(120% 120% at 85% 85%, #E9DEC8 0%, transparent 45%),
    var(--mist);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.reel-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.reel-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: .9rem;
  color: var(--ink-soft);
}
.reel-placeholder .play {
  width: 78px; height: 78px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(253, 250, 243, 0.85);
  border: 1px solid var(--line);
  font-size: 1.1rem;
  color: var(--matcha-deep);
  transition: transform .3s ease;
}
.reel-frame:hover .play { transform: scale(1.06); }
.reel-placeholder p { font-size: .95rem; letter-spacing: .02em; }

/* ---------------- work grid ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.6rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(110, 127, 78, 0.45);
  box-shadow: 0 18px 40px -18px rgba(78, 92, 56, 0.35);
}
.card-media {
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  color: var(--matcha-deep);
}
.card-media svg { width: 84px; height: 84px; opacity: .85; transition: transform .5s ease; }
.card:hover .card-media svg { transform: scale(1.08) rotate(-2deg); }

.media-a { background: linear-gradient(135deg, #E7EDD6 0%, #D3DDBA 100%); }
.media-b { background: linear-gradient(135deg, #EFE6D2 0%, #E3D5B4 100%); }
.media-c { background: linear-gradient(135deg, #DCE7D9 0%, #C2D4BE 100%); }
.media-d { background: linear-gradient(135deg, #F0E3D5 0%, #E6CFB6 100%); }
.media-e { background: linear-gradient(135deg, #E4EBD3 0%, #CBD9A8 100%); }
.media-f { background: linear-gradient(135deg, #E8E2D0 0%, #D8CCAE 100%); }

.card-body { padding: 1.35rem 1.5rem 1.6rem; }
.card-tags {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--matcha);
  margin-bottom: .55rem;
}
.card-body h3 {
  font-family: var(--font-display);
  font-weight: 480;
  font-size: 1.3rem;
  line-height: 1.25;
  margin-bottom: .6rem;
}
.card-desc {
  font-size: .93rem;
  font-weight: 300;
  color: var(--ink-soft);
}

/* ---------------- about ---------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.6fr);
  gap: 3rem;
  align-items: start;
}
.about-copy p {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}
.about-copy strong { font-weight: 600; color: var(--ink); }
.about-copy em { font-style: italic; color: var(--matcha-deep); }
.stats {
  list-style: none;
  display: flex; gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.stats li {
  display: flex; flex-direction: column;
  font-size: .85rem; color: var(--ink-soft);
}
.stats span {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 420;
  color: var(--matcha-deep);
  line-height: 1.1;
}

/* ---------------- contact ---------------- */
.contact { text-align: center; background: var(--paper); border-top: 1px solid var(--line); }
.contact .section-head { margin-bottom: 1rem; }
.contact-sub {
  max-width: 30rem;
  margin: 0 auto 2.2rem;
  color: var(--ink-soft);
  font-weight: 300;
}
.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}
.socials { display: flex; gap: 1.6rem; }
.socials a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.socials a:hover { color: var(--matcha-deep); border-color: var(--matcha); }

/* ---------------- footer ---------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  padding: 2.2rem var(--pad);
  color: var(--ink-soft);
  font-size: .85rem;
  border-top: 1px solid var(--line);
}
.foot-note { opacity: .65; }

/* ---------------- nav active ---------------- */
.nav-links a.active { color: var(--matcha-deep); }
.nav-links a.active::after { transform: scaleX(1); }

/* ---------------- subpage hero ---------------- */
.page-hero {
  padding: 9.5rem var(--pad) 4.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(2.2rem, 5.6vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-top: 1.1rem;
}
.page-hero h1 em { font-style: italic; color: var(--matcha-deep); }

/* ---------------- options (AI page) ---------------- */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}
.option-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.1rem 2.1rem 2.3rem;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.option-card:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 127, 78, 0.45);
  box-shadow: 0 18px 40px -18px rgba(78, 92, 56, 0.35);
}
.option-num {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--matcha);
}
.option-card h3 {
  font-family: var(--font-display);
  font-weight: 460;
  font-size: 1.65rem;
  margin: .55rem 0 .5rem;
}
.option-desc {
  color: var(--ink-soft);
  font-weight: 300;
  font-size: 1rem;
  margin-bottom: .4rem;
}
.option-label {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--matcha);
  margin-top: 1.35rem;
  margin-bottom: .35rem;
}
.option-list {
  list-style: none;
  display: grid;
  gap: .55rem;
}
.option-list li {
  display: flex;
  gap: .6rem;
  font-size: .95rem;
  font-weight: 300;
  color: var(--ink-soft);
}
.option-list li::before { content: "—"; color: var(--matcha); }
.option-note {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--matcha-deep);
}

/* ---------------- comparison table ---------------- */
.compare-section { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.compare {
  display: grid;
  grid-template-columns: 0.85fr 1fr 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.compare > div {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  font-size: .93rem;
  font-weight: 300;
  color: var(--ink-soft);
}
.compare > div:nth-child(-n+3) { border-top: none; }
.compare-head {
  font-weight: 600 !important;
  color: var(--ink) !important;
  font-family: var(--font-display);
  font-size: 1.05rem !important;
}
.compare-label {
  font-weight: 500;
  color: var(--ink) !important;
}

/* ---------------- photography grid ---------------- */
.photo-intro {
  max-width: 34rem;
  margin: -1.2rem 0 2.4rem;
  color: var(--ink-soft);
  font-weight: 300;
  font-size: 1.05rem;
}
.photo-grid {
  columns: 3;
  column-gap: 14px;
}
.photo-grid .photo {
  break-inside: avoid;
  margin: 0 0 14px;
}
.photo {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.photo:hover {
  transform: translateY(-5px);
  border-color: rgba(110, 127, 78, 0.45);
  box-shadow: 0 18px 40px -18px rgba(78, 92, 56, 0.35);
}
.photo-frame {
  display: block;
  overflow: hidden;
}
.photo-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .6s ease;
}
.photo:hover .photo-frame img { transform: scale(1.04); }
.photo-frame svg {
  width: 74px;
  height: 74px;
  color: var(--matcha-deep);
  opacity: .8;
  transition: transform .5s ease;
}
.photo:hover .photo-frame svg { transform: scale(1.07) rotate(-1.5deg); }
.photo-cap {
  padding: .85rem 1.1rem 1rem;
  font-size: .9rem;
  font-weight: 300;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.ph-a { background: linear-gradient(135deg, #EFE3CC 0%, #E5CDA4 100%); }
.ph-b { background: linear-gradient(135deg, #E7EDD6 0%, #CDD9AE 100%); }
.ph-c { background: linear-gradient(135deg, #F0E0D0 0%, #E3C3A0 100%); }
.ph-d { background: linear-gradient(135deg, #DFE9DF 0%, #BFD2BC 100%); }
.ph-e { background: linear-gradient(135deg, #EFE2D6 0%, #E2C9B0 100%); }
.ph-f { background: linear-gradient(135deg, #E8EAD2 0%, #CCD6A6 100%); }

/* ---------------- photography collections ---------------- */
.photo-link { display: block; color: inherit; text-decoration: none; }
.cap-coll {
  display: block;
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--matcha);
  margin-top: .3rem;
  font-weight: 500;
}
.backlink { margin-top: 1.4rem; font-size: .92rem; }
.backlink a {
  color: var(--matcha-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.collections { margin-top: 4rem; }
.collections-title {
  font-family: var(--font-display);
  font-weight: 420;
  font-size: 1.45rem;
  margin-bottom: 1.3rem;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.2rem;
}
.collection-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.collection-card:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 127, 78, 0.45);
  box-shadow: 0 18px 40px -18px rgba(78, 92, 56, 0.35);
}
.collection-cover { aspect-ratio: 4 / 3; overflow: hidden; }
.collection-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.collection-card:hover .collection-cover img { transform: scale(1.05); }
.collection-meta {
  padding: .9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.collection-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 420;
  line-height: 1.3;
}
.collection-count {
  font-size: .78rem;
  color: var(--matcha-deep);
  letter-spacing: .04em;
}


/* ---------------- reels ---------------- */
.reel-showcase {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.75rem;
  align-items: start;
}
.reel-player video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  background: #000;
  display: block;
}
.reel-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}
.reel-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
}
.reel-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.reel-all {
  color: var(--matcha-deep);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.reel-chips {
  display: flex;
  gap: .9rem;
  flex-wrap: wrap;
}
.reel-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  width: 92px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .45rem;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease;
}
.reel-chip:hover { transform: translateY(-3px); border-color: var(--matcha); }
.reel-chip img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.reel-chip span {
  font-size: .66rem;
  line-height: 1.25;
  text-align: center;
  color: var(--ink-soft);
}
.reels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}
.reel-card { margin: 0; }
.reel-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  background: #000;
  display: block;
}
.reel-card figcaption {
  padding: .7rem .2rem 0;
  font-family: var(--font-display);
  font-size: .98rem;
  color: var(--ink-soft);
  text-align: center;
}
/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .nav-links { gap: 1.1rem; }
  .nav-links a:not(.nav-cta) { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .steam { display: none; }
  .options { grid-template-columns: 1fr; }
  .photo-grid { columns: 2; }
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .reel-showcase { grid-template-columns: 1fr; }
  .reel-player { max-width: 320px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .photo-grid { columns: 2; }
  .collection-grid { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare > div { border-top: 1px solid var(--line); }
  .compare > div:nth-child(-n+3) { border-top: 1px solid var(--line); }
  .compare > div:nth-child(1) { border-top: none; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .stats { gap: 1.4rem; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .enso, .steam path, .grain { animation: none !important; }
  .steam path { stroke-dashoffset: 0; opacity: .5; }
  * { transition-duration: .01ms !important; }
}
