/* ============================================================
   Sean Holleran — Portfolio
   Warm creative studio: paper, ink, coral, mustard, sage
   ============================================================ */

:root {
  --paper: #FBF4E8;
  --paper-deep: #F5EAD7;
  --peach: #F9E3D0;
  --ink: #2B231C;
  --ink-soft: #5C5248;
  --coral: #E4572E;
  --mustard: #E9A13B;
  --sage: #7A9E7E;
  --white: #FFFDF8;
  --shadow: 0 12px 32px rgba(43, 35, 28, 0.14);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 640; letter-spacing: -0.01em; }

em.squiggle {
  font-style: italic;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  color: var(--coral);
  position: relative;
  white-space: nowrap;
}
em.squiggle::after {
  content: "";
  position: absolute;
  left: -2%;
  bottom: -0.12em;
  width: 104%;
  height: 0.28em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 Q 12 2, 25 7 T 50 7 T 75 7 T 98 6' fill='none' stroke='%23E4572E' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
}
em.squiggle--mustard { color: var(--mustard); }
em.squiggle--mustard::after { filter: hue-rotate(28deg) saturate(1.4); }
em.squiggle--sage { color: var(--sage); }
em.squiggle--sage::after { filter: hue-rotate(95deg) saturate(0.6); }

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.2rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
}
.nav__logo-star { color: var(--coral); margin: 0 0.1em; display: inline-block; transition: transform 0.4s ease; }
.nav__logo:hover .nav__logo-star { transform: rotate(180deg); }

.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav__links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 3px;
  background: var(--coral);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }

.nav__cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  transition: background 0.2s, color 0.2s;
}
.nav__cta:hover { background: var(--coral); border-color: var(--coral); }

.nav__burger { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.nav__burger span { display: block; width: 26px; height: 3px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: 0.25s; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
}
.btn--primary {
  background: var(--coral);
  color: var(--white);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn--primary:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn--primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--small { font-size: 0.85rem; padding: 0.5rem 1rem; background: var(--white); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn--small:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: var(--mustard); }
.btn--big {
  font-size: clamp(0.85rem, 4.2vw, 1.5rem);
  padding: 1rem clamp(1rem, 4vw, 2.2rem);
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ============ HERO ============ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 8vh, 6rem) clamp(1.2rem, 5vw, 5rem) clamp(3rem, 6vh, 5rem);
  max-width: 1300px;
  margin: 0 auto;
}

.hero__eyebrow {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.pin { margin-right: 0.3em; }

.hero__title {
  font-size: clamp(1.9rem, 5vw, 4.6rem);
  line-height: 1.06;
  margin-bottom: 1.4rem;
}
.hero__period { color: var(--coral); }

.hero__sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 1.8rem;
}

.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.2rem; }

.hero__stickers { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.sticker {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  transform: rotate(var(--rot, 0deg));
  box-shadow: 2px 3px 0 rgba(43,35,28,0.25);
  transition: transform 0.2s ease;
}
.sticker:hover { transform: rotate(0deg) scale(1.08); }
.sticker--coral { background: var(--coral); color: var(--white); }
.sticker--mustard { background: var(--mustard); color: var(--ink); }
.sticker--sage { background: var(--sage); color: var(--white); }
.sticker--ink { background: var(--ink); color: var(--paper); }

.hero__media { position: relative; }

/* ============ POLAROID ============ */
.polaroid {
  background: var(--white);
  padding: 0.9rem 0.9rem 0.6rem;
  border-radius: 6px;
  box-shadow: var(--shadow);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.35s ease;
  position: relative;
}
.polaroid:hover { transform: rotate(0deg) scale(1.02); }
.polaroid video, .polaroid img { border-radius: 4px; width: 100%; }
.polaroid figcaption {
  font-family: var(--font-display);
  font-style: italic;
  text-align: center;
  padding: 0.55rem 0 0.25rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.polaroid--small { max-width: 240px; margin: -3rem 0 0 auto; }

.tape {
  position: absolute;
  width: 90px; height: 28px;
  background: rgba(233, 161, 59, 0.5);
  border-left: 2px dashed rgba(255,255,255,0.5);
  border-right: 2px dashed rgba(255,255,255,0.5);
  top: -14px;
}
.tape--left { left: -24px; transform: rotate(-38deg); }
.tape--right { right: -24px; transform: rotate(38deg); }
.tape--top { left: 50%; transform: translateX(-50%) rotate(-3deg); }

.doodle-arrow {
  position: absolute;
  width: 110px;
  color: var(--coral);
  left: -70px;
  bottom: -18px;
  transform: rotate(10deg);
}

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.marquee__track {
  display: flex;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ SECTIONS ============ */
.section {
  padding: clamp(4rem, 9vh, 7rem) clamp(1.2rem, 5vw, 5rem);
  max-width: 1300px;
  margin: 0 auto;
}
.section--peach {
  max-width: none;
  background: var(--peach);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.section--peach > * { max-width: 1300px; margin-left: auto; margin-right: auto; }
.section--cream {
  max-width: none;
  background: var(--paper-deep);
}
.section--cream > * { max-width: 1300px; margin-left: auto; margin-right: auto; }

.section__head { margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.section__eyebrow {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--coral);
  margin-bottom: 0.7rem;
}
.section__title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
}
.section__sub {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

/* ============ WORK GRID ============ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.8rem);
}

.work-card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 6px 6px 0 rgba(43,35,28,0.9);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.work-card:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 10px 12px 0 rgba(43,35,28,0.9);
}

.work-card__media { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 2px solid var(--ink); }
.work-card__media video { width: 100%; height: 100%; object-fit: cover; }

.work-card__body { padding: 1.4rem 1.6rem 1.6rem; }
.work-card__body h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.work-card__body p { color: var(--ink-soft); margin-bottom: 1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tags span {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}

/* ============ PHONES (short-form) ============ */
.phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1rem, 3vw, 2.5rem);
  flex-wrap: wrap;
}

.phone {
  width: min(250px, 78vw);
  background: var(--ink);
  border-radius: 32px;
  padding: 12px 12px 8px;
  box-shadow: var(--shadow);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.3s ease;
  position: relative;
}
.phone:hover { transform: rotate(0deg) scale(1.03); }
.phone--lift { margin-top: -1.2rem; }
.phone video {
  border-radius: 22px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  width: 100%;
  cursor: pointer;
}
.phone figcaption {
  color: var(--paper);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 0 0.35rem;
}
.phone__hint {
  position: absolute;
  top: 24px; left: 50%;
  transform: translateX(-50%);
  background: rgba(43,35,28,0.75);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ============ AI LAB ============ */
.tools-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 2.5rem; }
.tool-chip {
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--sage);
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.ai-card {
  border: 2px dashed var(--ink-soft);
  border-radius: 14px;
  padding: 1.5rem;
  background: var(--white);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.3s ease, border-color 0.3s;
}
.ai-card:hover { transform: rotate(0deg) translateY(-4px); border-color: var(--sage); }
.ai-card__frame {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  font-size: 3rem;
  background: var(--paper-deep);
  border-radius: 8px;
  margin-bottom: 1rem;
  position: relative;
}
.ai-card__badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--sage);
  color: var(--white);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.ai-card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.ai-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ============ STORY ============ */
.story {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.story__media { position: relative; }
.story__copy p { margin-bottom: 1.1rem; color: var(--ink-soft); font-size: 1.05rem; }
.story__copy .section__title { margin-bottom: 1.4rem; }

.story__stats { display: flex; gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2rem; }
.stat strong {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  display: block;
  color: var(--coral);
}
.stat span { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }

/* ============ SERVICES ============ */
.services {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.service {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  box-shadow: 5px 5px 0 rgba(43,35,28,0.85);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.service:hover { transform: translateY(-5px) rotate(-0.5deg); box-shadow: 8px 9px 0 rgba(43,35,28,0.85); }
.service__icon { font-size: 2rem; display: block; margin-bottom: 0.7rem; }
.service h3 { font-size: 1.3rem; margin-bottom: 0.45rem; }
.service p { color: var(--ink-soft); font-size: 0.95rem; }
.service--featured { background: var(--ink); }
.service--featured h3 { color: var(--paper); }
.service--featured p { color: #C9BEB2; }
.service__flag {
  position: absolute;
  top: -12px; right: 14px;
  background: var(--coral);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  transform: rotate(3deg);
}

/* ============ CONTACT ============ */
.contact {
  text-align: center;
  padding: clamp(4rem, 10vh, 7rem) 1.5rem;
  background: var(--ink);
  color: var(--paper);
  position: relative;
}
.contact__squiggle {
  position: absolute;
  top: -2px; left: 0;
  width: 100%; height: 26px;
  color: var(--paper);
}
.contact h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 0.8rem;
  font-style: italic;
  font-variation-settings: "SOFT" 70, "WONK" 1;
}
.contact > p { color: #C9BEB2; font-size: 1.15rem; margin-bottom: 2rem; }
.contact .btn--primary { border-color: var(--paper); box-shadow: 4px 4px 0 var(--paper); }
.contact .btn--primary:hover { box-shadow: 7px 7px 0 var(--paper); }
.contact__meta { margin-top: 1.6rem; font-size: 0.95rem; color: #8F847A; }

.footer {
  background: var(--ink);
  color: #8F847A;
  text-align: center;
  padding: 1.2rem;
  font-size: 0.85rem;
  border-top: 1px solid #443A31;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(30, 24, 19, 0.92);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.lightbox[hidden] { display: none; }
.lightbox__inner { width: min(960px, 100%); }
.lightbox__player { aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.lightbox__player iframe { width: 100%; height: 100%; border: 0; }
.lightbox__thumbs { display: flex; gap: 0.6rem; margin-top: 0.9rem; flex-wrap: wrap; justify-content: center; }
.lightbox__thumbs img {
  width: 120px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s;
}
.lightbox__thumbs img:hover, .lightbox__thumbs img.is-active { opacity: 1; border-color: var(--coral); }
.lightbox__close {
  position: absolute;
  top: 1.2rem; right: 1.6rem;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(24px) rotate(var(--rot, 0deg)); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__media { max-width: 480px; margin: 0 auto; }
  .doodle-arrow { display: none; }
  .work-grid { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .polaroid--small { margin: -2.5rem 1rem 0 auto; }

  .nav__burger { display: block; }
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
    padding: 1.2rem;
    gap: 1rem;
  }
  .nav__links.is-open { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .reveal { opacity: 1; transform: rotate(var(--rot, 0deg)); transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
