/* ============================================
   Joanna Epan — Email Marketing Portfolio
   Design tokens: soft blush & charcoal, clean sans
   ============================================ */

:root {
  --charcoal:      #26211D;
  --charcoal-soft: #5C5049;
  --ink-faint:     #948575;
  --blush:         #E8DCC8;
  --blush-pale:    #F4EEE2;
  --paper:         #FAF7F1;
  --paper-deep:    #F3ECDF;
  --white:         #FFFFFF;
  --rose:          #A9843F;
  --rose-deep:     #8A6A2F;
  --line:          rgba(38, 33, 29, 0.11);
  --line-rose:     rgba(169, 132, 63, 0.3);

  --display: "Fraunces", "Iowan Old Style", "Times New Roman", serif;
  --body:    "Inter", "Helvetica Neue", Arial, sans-serif;

  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 720px) {
  .wrap { padding: 0 22px; }
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--body);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 18px;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--charcoal);
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); line-height: 1.08; font-weight: 400; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.18; font-weight: 400; }
h3 { font-size: 1.3rem; font-weight: 500; }
em, .accent-italic { font-style: italic; color: var(--rose-deep); font-weight: 400; }

p.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--charcoal-soft);
  max-width: 640px;
  line-height: 1.6;
}

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 245, 241, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand .mark {
  font-family: var(--display);
  font-style: italic;
  color: var(--rose);
}
.brand small {
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-family: var(--body);
  font-weight: 500;
}

nav.links { display: flex; gap: 36px; align-items: center; }
nav.links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal-soft);
  position: relative;
  padding-bottom: 4px;
  transition: color .2s ease;
}
nav.links a:hover { color: var(--rose-deep); }
nav.links a.active { color: var(--charcoal); }
nav.links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--rose);
}

.nav-cta {
  border: 1px solid var(--charcoal);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--charcoal); color: var(--paper); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  nav.links { display: none; }
  .nav-toggle {
    display: inline-flex;
    border: 1px solid var(--charcoal);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all .25s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--charcoal); color: var(--paper); }
.btn-primary:hover { background: var(--rose-deep); transform: translateY(-1px); }
.btn-outline { border-color: var(--charcoal); color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: var(--paper); }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 34px; }

/* ---------- Sections ---------- */
section { padding: 100px 0; }
section.tight { padding: 70px 0; }
@media (max-width: 720px) {
  section { padding: 64px 0; }
}

.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--blush-pale);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-rose);
}
.hero-visual img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
}
.hero-stat-card {
  position: absolute;
  bottom: 22px; left: 22px; right: 22px;
  background: rgba(251,245,241,0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hero-stat-card .num {
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--rose-deep);
  font-weight: 600;
}
.hero-stat-card .label {
  font-size: 0.78rem;
  color: var(--charcoal-soft);
  max-width: 150px;
  line-height: 1.3;
}

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-strip .stat {
  padding: 34px 28px;
  border-left: 1px solid var(--line);
}
.stat-strip .stat:first-child { border-left: none; }
.stat-strip .num {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  color: var(--charcoal);
  font-weight: 500;
}
.stat-strip .num span { color: var(--rose); }
.stat-strip .cap {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 8px;
  line-height: 1.35;
}
@media (max-width: 720px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip .stat:nth-child(3) { border-left: none; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.service-card {
  background: var(--paper);
  padding: 38px 32px;
  transition: background .25s ease;
}
.service-card:hover { background: var(--blush-pale); }
.service-card .idx {
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 16px;
  display: block;
}
.service-card h3 { margin-bottom: 10px; }
.service-card p { color: var(--charcoal-soft); font-size: 0.95rem; margin: 0; }
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ---------- Section heading pattern ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 54px;
}
.section-head p { max-width: 420px; color: var(--charcoal-soft); margin: 14px 0 0; }
@media (max-width: 720px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ---------- Portfolio ---------- */
.gallery-item { margin-bottom: 90px; }
.gallery-frame {
  border-radius: 18px;
  border: 1px solid var(--line-rose);
  overflow: hidden;
  background: var(--white);
}
.gallery-caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 22px;
  gap: 20px;
}
.gallery-caption h3 { font-size: 1.15rem; }
.gallery-caption .tag {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 600;
  white-space: nowrap;
}
.gallery-caption p { color: var(--ink-faint); font-size: 0.92rem; margin: 6px 0 0; max-width: 520px; }

/* ---------- Case study ---------- */
.case-block {
  background: var(--charcoal);
  color: var(--paper);
  border-radius: 22px;
  padding: 64px;
}
.case-block .eyebrow { color: var(--blush); }
.case-block h2 { color: var(--paper); }
.case-block p.lede { color: rgba(251,245,241,0.75); }
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 50px;
}
.case-col h4 {
  color: var(--blush);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  font-family: var(--body);
  font-weight: 600;
}
.case-col p {
  color: rgba(251,245,241,0.72);
  font-size: 0.94rem;
  margin: 0;
}
.case-stats {
  display: flex;
  gap: 50px;
  margin-top: 54px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(251,245,241,0.18);
  padding-top: 40px;
}
.case-stats .num {
  font-family: var(--display);
  font-size: 2.4rem;
  color: var(--blush);
  font-weight: 500;
}
.case-stats .cap { font-size: 0.82rem; color: rgba(251,245,241,0.6); margin-top: 6px; }
@media (max-width: 900px) {
  .case-block { padding: 40px 26px; }
  .case-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Tools row ---------- */
.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.tool-pill {
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--charcoal-soft);
  font-weight: 500;
}

/* ---------- About ---------- */
.about-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) {
  .about-hero { grid-template-columns: 1fr; }
}
.about-portrait {
  aspect-ratio: 3/4;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--blush) 0%, var(--blush-pale) 100%);
  border: 1px solid var(--line-rose);
  display: flex;
  align-items: flex-end;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.about-portrait .sig {
  font-family: var(--display);
  font-style: italic;
  font-size: 3.4rem;
  color: rgba(42,36,34,0.16);
}

.who-list {
  list-style: none;
  padding: 0; margin: 26px 0 0;
  display: grid;
  gap: 14px;
}
.who-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 0.98rem;
  color: var(--charcoal-soft);
}
.who-list li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rose);
  margin-top: 9px;
  flex-shrink: 0;
}

.cert-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-rose);
  margin-top: 30px;
}

/* ---------- Contact ---------- */
.contact-card {
  background: var(--charcoal);
  color: var(--paper);
  border-radius: 24px;
  padding: 80px 64px;
  text-align: center;
}
.contact-card .eyebrow { color: var(--blush); }
.contact-card h2 { color: var(--paper); }
.contact-card p.lede { color: rgba(251,245,241,0.75); margin: 20px auto 0; }
.contact-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}
.contact-card .btn-outline { border-color: rgba(251,245,241,0.5); color: var(--paper); }
.contact-card .btn-outline:hover { background: var(--paper); color: var(--charcoal); }
.contact-card .btn-primary { background: var(--blush); color: var(--charcoal); }
.contact-card .btn-primary:hover { background: var(--paper); }
@media (max-width: 720px) {
  .contact-card { padding: 54px 26px; }
}

.simple-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 60px;
}
.simple-contact-grid .cell {
  background: var(--paper);
  padding: 40px 36px;
}
.simple-contact-grid .cell h4 {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--rose);
  margin-bottom: 12px;
}
.simple-contact-grid .cell a, .simple-contact-grid .cell span {
  font-size: 1.05rem;
  color: var(--charcoal);
}
@media (max-width: 720px) {
  .simple-contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }

/* ---------- Design masonry gallery ---------- */
.design-masonry {
  columns: 3 320px;
  column-gap: 26px;
}
@media (max-width: 900px) {
  .design-masonry { columns: 2 260px; }
}
@media (max-width: 600px) {
  .design-masonry { columns: 1; }
}

.design-card {
  break-inside: avoid;
  margin-bottom: 26px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line-rose);
  position: relative;
  cursor: pointer;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease, border-color .45s ease;
  box-shadow: 0 1px 2px rgba(38,33,29,0.04);
}
.design-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -18px rgba(38,33,29,0.28);
  border-color: var(--rose);
  z-index: 2;
}
.design-card .frame {
  max-height: 560px;
  overflow: hidden;
  position: relative;
}
.design-card img {
  width: 100%;
  display: block;
  transition: transform 9s linear;
}
.design-card:hover img {
  transform: translateY(calc(-100% + 560px));
}
.design-card .frame::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(38,33,29,0.55));
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.design-card:hover .frame::after { opacity: 1; }
.design-card .tag-float {
  position: absolute;
  left: 14px; bottom: 12px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(6px);
  transition: all .35s ease;
}
.design-card:hover .tag-float { opacity: 1; transform: translateY(0); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(38,33,29,0.86);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  padding: 60px 20px;
  overflow-y: auto;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 480px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: fixed;
  top: 24px; right: 32px;
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 8px 18px;
  border-radius: 999px;
  z-index: 201;
}

/* ---------- Marquee tools row ---------- */
.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-inner .brand { font-size: 1rem; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { font-size: 0.88rem; color: var(--charcoal-soft); }
.footer-links a:hover { color: var(--rose-deep); }
.footer-note { font-size: 0.8rem; color: var(--ink-faint); }
