/* Second Brew Studio v3 — Dark Roast Espresso & Warm Paper Menu */
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard";
  src: url("fonts/Pretendard-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --charcoal: #20201E;
  --charcoal-elevated: #282825;
  --charcoal-line: rgba(248, 247, 243, 0.14);
  --brown: #A77A5B;
  --brown-deep: #7D573C;
  --brown-glow: rgba(167, 122, 91, 0.18);
  --white: #F8F7F3;
  --paper-elevated: #FCFBF8;
  --crema: #EFEBE3;
  --line: #DAD4C8;
  --muted: #625F59;
  --muted-dark: #ABA69C;
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  --font-display: "Montserrat", "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(167, 122, 91, 0.28);
  color: inherit;
}

h1, h2, h3, p, ul, ol, dl, dd {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 4px;
  border-radius: 3px;
}

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

.wrap {
  width: min(1220px, calc(100% - 96px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  top: 10px;
  left: 20px;
  background: var(--brown);
  color: var(--white);
  padding: 10px 16px;
  font-size: 13px;
  transform: translateY(-200%);
  z-index: 100;
}

.skip:focus {
  transform: none;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

.text-brown-deep {
  color: var(--brown-deep);
}

.text-brown {
  color: var(--brown);
}

.text-muted {
  color: var(--muted);
}

.mb-14 {
  margin-bottom: 14px;
}

.contact-band--compact {
  padding-top: 0;
}

/* ==========================================================================
   DARK ROAST HERO BAND (#20201E)
   ========================================================================== */
.roast-stage {
  background:
    radial-gradient(circle at 78% 18%, var(--brown-glow), transparent 48%),
    radial-gradient(circle at 14% 85%, rgba(167, 122, 91, 0.09), transparent 44%),
    var(--charcoal);
  color: var(--white);
  position: relative;
}

.header {
  min-height: 100px;
  padding-block: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--charcoal-line);
}

.header--light {
  border-bottom-color: var(--line);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
}

.brand-primary {
  width: 240px; /* Brand Guide p.4 min width 240px */
  height: auto;
  transform: translateY(-3px); /* Addendum v1.1: optical cap-height alignment */
}

.brand-mark-mobile {
  display: none;
  height: 36px; /* Brand Guide p.4 min height 32px */
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

nav a {
  color: var(--muted-dark);
  padding: 6px 0;
}

nav a:hover {
  color: var(--white);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--charcoal-line);
  border-radius: 999px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.lang-btn {
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--muted-dark);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-btn[aria-pressed="true"] {
  background: var(--brown);
  color: var(--white);
}

/* Hero Body */
.hero {
  padding-top: 64px;
  padding-bottom: 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 56px;
  align-items: end;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brown);
  margin-bottom: 24px;
}

.steam-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brown);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero-title .accent {
  color: var(--brown);
}

.hero-desc {
  margin-top: 26px;
  max-width: 520px;
  font-size: 16.5px;
  color: var(--muted-dark);
  line-height: 1.78;
}

.hero-cta-row {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--brown);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
}

.btn-primary:hover {
  background: #B88A6A;
  color: var(--white);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--charcoal-line);
  color: var(--white);
  font-size: 14px;
}

.btn-ghost:hover {
  border-color: var(--brown);
  color: var(--brown);
}

/* Now Pouring Menu Board in Hero */
.menu-board {
  background: var(--charcoal-elevated);
  border: 1px solid var(--charcoal-line);
  border-radius: 18px;
  padding: 24px;
}

.menu-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--charcoal-line);
  color: var(--muted-dark);
}

.menu-board-head .live {
  color: var(--brown);
}

.menu-items {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.menu-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 8px;
  border-bottom: 1px solid var(--charcoal-line);
  border-radius: 10px;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.menu-item:last-child {
  border-bottom: 0;
}

.menu-item:hover {
  background: rgba(248, 247, 243, 0.04);
  transform: translateX(3px);
}

.menu-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.menu-item-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
}

.menu-item-sub {
  font-size: 13px;
  color: var(--muted-dark);
  margin-top: 2px;
}

.menu-item-arrow {
  font-size: 14px;
  color: var(--brown);
}

.menu-board-foot {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--charcoal-line);
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted-dark);
}

/* ==========================================================================
   WARM PAPER SHOWCASE (#F8F7F3)
   ========================================================================== */
.paper-section {
  padding-block: 96px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-top: 10px;
}

.section-header .mono-label {
  color: var(--brown-deep);
}

.section-header-meta {
  color: var(--muted);
}

/* Alternating Bento App Showcase */
.showcase-stack {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.showcase-row {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 52px;
  align-items: center;
}

.showcase-row--reverse .showcase-stage {
  order: 2;
}

.showcase-stage {
  background: var(--crema);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 28px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  position: relative;
  overflow: hidden;
}

.stage-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stage-index {
  color: var(--brown-deep);
}

.screen-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
}

.screen-tab {
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.screen-tab.is-active {
  background: var(--charcoal);
  color: var(--white);
}

/* Dual overlapping raw iPhone stage */
.dual-phones {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone {
  border-radius: 30px;
  padding: 7px;
  background: var(--charcoal);
  box-shadow: 0 24px 48px rgba(32, 32, 30, 0.18);
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
}

.phone img {
  width: 100%;
  border-radius: 23px;
  display: block;
}

.phone--back {
  position: absolute;
  width: 186px;
  right: 14px;
  top: 38px;
  transform: rotate(5deg);
  opacity: 0.88;
  box-shadow: 0 18px 36px rgba(32, 32, 30, 0.12);
}

.phone--front {
  position: relative;
  z-index: 2;
  width: 214px;
  transform: translateX(-34px) rotate(-1.5deg);
}

.showcase-stage:hover .phone--front {
  transform: translateX(-38px) translateY(-4px) rotate(-0.5deg);
}

.showcase-stage:hover .phone--back {
  transform: translateX(6px) rotate(7deg);
}

/* Editorial Spec Copy */
.app-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon-lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(32, 32, 30, 0.08);
  flex-shrink: 0;
}

.app-title-group h3 {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.6vw, 46px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.app-title-group h3 .accent {
  color: var(--brown);
}

.app-subtitle {
  margin-top: 6px;
  font-size: 15px;
  color: var(--brown-deep);
}

.app-desc {
  margin-top: 22px;
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.8;
}

/* Coffee Bag Label Spec Table */
.spec-table {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.spec-cell {
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--line);
}

.spec-cell dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.spec-cell dd {
  font-size: 13.5px;
  color: var(--charcoal);
  font-weight: 500;
}

.app-link-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--charcoal);
  padding: 9px 0;
  font-size: 14px;
  font-weight: 500;
}

.text-link:hover {
  color: var(--brown-deep);
  border-bottom-color: var(--brown-deep);
}

/* ==========================================================================
   CREMA EXTRACTION PHILOSOPHY BAND (#EFEBE3)
   ========================================================================== */
.crema-band {
  background: var(--crema);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 88px;
}

.craft-intro {
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.craft-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-top: 12px;
}

.craft-intro p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  padding-top: 24px;
}

.brew-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.brew-step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
}

.brew-step-num {
  color: var(--brown-deep);
  margin-bottom: 14px;
  display: block;
}

.brew-step h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
}

.brew-step p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* ==========================================================================
   DARK ROAST CONTACT & FOOTER (#20201E)
   ========================================================================== */
.contact-band {
  background: var(--charcoal);
  color: var(--white);
  padding-top: 84px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: end;
  padding-bottom: 76px;
}

.contact-brand-mark {
  height: 44px; /* Brand Guide p.4 min height 32px */
  width: auto;
  margin-bottom: 24px;
}

.contact-grid h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.16;
}

.contact-right p {
  font-size: 15.5px;
  color: var(--muted-dark);
  margin-bottom: 22px;
  line-height: 1.75;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}

.email-link {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  border-bottom: 1px solid rgba(248, 247, 243, 0.3);
  padding-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.email-link:hover {
  color: var(--brown);
  border-bottom-color: var(--brown);
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 15px;
  border: 1px solid rgba(248, 247, 243, 0.25);
  border-radius: 999px;
  color: var(--muted-dark);
}

.copy-btn:hover {
  border-color: var(--brown);
  color: var(--white);
}

.copy-btn.is-copied {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--white);
}

.footer {
  border-top: 1px solid var(--charcoal-line);
  padding-block: 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 12px;
  color: var(--muted-dark);
}

.footer-logo {
  width: 160px; /* Brand Guide p.4 min width 160px */
  height: auto;
}

.footer p {
  margin-left: auto;
}

.footer a:hover {
  color: var(--white);
}

/* Policy & 404 */
.policy {
  max-width: 760px;
  padding-block: 72px 96px;
  min-height: 70vh;
}

.policy h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 18px 0;
}

.policy-intro {
  font-size: 17.5px;
  color: var(--muted);
  margin-bottom: 22px;
}

.policy section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.policy h2 {
  font-size: 21px;
  margin-bottom: 10px;
}

.policy section p {
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.75;
}

.policy section a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Scroll Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 980px) {
  .wrap {
    width: min(1220px, calc(100% - 56px));
  }
  .hero-grid,
  .showcase-row,
  .craft-intro,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .showcase-row--reverse .showcase-stage {
    order: 0;
  }
  .brew-steps {
    grid-template-columns: 1fr;
  }
  .craft-intro p {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .brand-primary {
    display: none;
  }
  .brand-mark-mobile {
    display: block;
  }
  .header-right {
    gap: 14px;
  }
  nav {
    gap: 16px;
    font-size: 13px;
  }
  .hero {
    padding-top: 40px;
    padding-bottom: 64px;
  }
  .paper-section,
  .crema-band {
    padding-block: 60px;
  }
  .section-header {
    display: block;
  }
  .section-header-meta {
    display: block;
    margin-top: 10px;
  }
  .dual-phones {
    height: 390px;
  }
  .phone--front {
    width: 184px;
    transform: translateX(-24px) rotate(-1deg);
  }
  .phone--back {
    width: 160px;
    right: 8px;
  }
  .spec-table {
    grid-template-columns: 1fr;
  }
  .footer {
    flex-wrap: wrap;
    gap: 16px 24px;
  }
  .footer p {
    margin-left: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .phone,
  .menu-item {
    transition: none;
  }
}
