/*
 * 화롯가 (Hwarotga) — company site stylesheet
 * Root-level company page for firepot.kr. Hanji/hearth palette — kept
 * intentionally distinct from the 화성인사이드 service tone at /inside/.
 * Mobile-first. Breakpoints: 640 / 1024 / 1280. No external resources.
 */

:root {
  --cp-ink: #181512;
  --cp-ink-soft: #27211c;
  --cp-paper: #f4efe6;
  --cp-paper-bright: #fbf8f2;
  --cp-paper-deep: #e9dfd0;
  --cp-muted: #74695e;
  --cp-line: rgba(35, 27, 21, 0.16);
  --cp-line-light: rgba(255, 246, 232, 0.18);
  --cp-red: #982d2a;
  --cp-red-dark: #6f1f1d;
  --cp-copper: #c58a55;
  --cp-ivory: #fff2de;
  --cp-inside-accent: #e8622a;
  --cp-sans:
    "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Noto Sans KR", sans-serif;
  --cp-shell-pad: 20px;
  --cp-header-h: 68px;
  --cp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  :root {
    --cp-shell-pad: 32px;
    --cp-header-h: 76px;
  }
}

@media (min-width: 1024px) {
  :root {
    --cp-shell-pad: 40px;
    --cp-header-h: 84px;
  }
}

@media (min-width: 1280px) {
  :root {
    --cp-shell-pad: 48px;
  }
}

/* ---------------------------------------------------------------------- */
/* Reset & base                                                            */
/* ---------------------------------------------------------------------- */

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--cp-header-h) + 12px);
}

body.cp-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--cp-paper);
  color: var(--cp-ink);
  font-family: var(--cp-sans);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.cp-page *,
body.cp-page *::before,
body.cp-page *::after {
  box-sizing: border-box;
}

body.cp-page img {
  max-width: 100%;
  display: block;
}

body.cp-page a {
  color: inherit;
  text-decoration: none;
}

body.cp-page :focus-visible {
  outline: 2px solid var(--cp-copper);
  outline-offset: 3px;
}

body.cp-page h1,
body.cp-page h2,
body.cp-page h3,
body.cp-page p,
body.cp-page blockquote,
body.cp-page ol,
body.cp-page ul,
body.cp-page dl,
body.cp-page dd {
  margin: 0;
}

.cp-skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  translate: 0 -160%;
  padding: 12px 18px;
  border-radius: 2px;
  background: var(--cp-ink);
  color: var(--cp-ivory);
  font-weight: 700;
  transition: translate 160ms var(--cp-ease);
}

.cp-skip-link:focus {
  translate: 0;
}

.cp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cp-shell {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--cp-shell-pad);
}

.cp-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--cp-red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.cp-eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: currentColor;
}

.cp-eyebrow--light {
  color: var(--cp-copper);
}

.cp-index {
  color: var(--cp-red);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cp-index--light {
  color: var(--cp-copper);
}

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.cp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--cp-header-h);
  border-bottom: 1px solid var(--cp-line);
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(14px) saturate(120%);
}

.cp-header-inner {
  position: relative;
  height: var(--cp-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cp-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.cp-brand-mark {
  width: auto;
  height: 40px;
}

@media (min-width: 640px) {
  .cp-brand-mark {
    height: 48px;
  }
}

@media (min-width: 1024px) {
  .cp-brand-mark {
    height: 54px;
  }
}

/* Checkbox-driven nav toggle: no script, pure CSS */
.cp-nav-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid var(--cp-line);
  border-radius: 2px;
  background-color: transparent;
  background-image:
    linear-gradient(var(--cp-ink), var(--cp-ink)),
    linear-gradient(var(--cp-ink), var(--cp-ink)),
    linear-gradient(var(--cp-ink), var(--cp-ink));
  background-repeat: no-repeat;
  background-size: 18px 2px;
  background-position:
    center calc(50% - 6px),
    center 50%,
    center calc(50% + 6px);
  cursor: pointer;
}

.cp-nav-toggle:checked {
  background-color: var(--cp-paper-deep);
}

.cp-nav-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 90;
  display: grid;
  gap: 4px;
  max-height: 0;
  padding-inline: var(--cp-shell-pad);
  overflow: hidden;
  border-bottom: 1px solid var(--cp-line);
  background: var(--cp-paper-bright);
  box-shadow: 0 22px 48px rgba(20, 15, 11, 0.14);
  opacity: 0;
  visibility: hidden;
  transition:
    max-height 260ms var(--cp-ease),
    opacity 200ms ease,
    visibility 260ms ease;
}

.cp-nav-toggle:checked ~ .cp-nav-panel {
  max-height: 420px;
  padding-block: 12px 20px;
  opacity: 1;
  visibility: visible;
}

.cp-nav {
  display: grid;
  gap: 2px;
}

.cp-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--cp-ink-soft);
  font-weight: 600;
  font-size: 0.96rem;
}

.cp-nav a:hover {
  color: var(--cp-red);
}

/* body.cp-page a { color: inherit } 보다 특이도가 높아야 지정 색이 유지된다.
   버튼류는 자체 배경을 가지므로 부모 색을 상속하면 대비가 무너진다. */
.cp-header-cta.cp-header-cta,
.cp-button.cp-button {
  color: var(--cp-ivory);
}

.cp-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 18px;
  border-radius: 2px;
  background: var(--cp-ink);
  color: var(--cp-ivory);
  font-size: 0.86rem;
  font-weight: 700;
}

@media (min-width: 1024px) {
  .cp-nav-toggle {
    display: none;
  }

  .cp-nav-panel {
    position: static;
    display: flex;
    align-items: center;
    gap: 28px;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
  }

  .cp-nav {
    display: flex;
    align-items: center;
    gap: 30px;
  }

  .cp-nav a {
    min-height: auto;
    padding-block: 8px;
    font-size: 0.9rem;
  }

  .cp-header-cta {
    margin-top: 0;
  }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.cp-hero {
  position: relative;
  overflow: hidden;
  padding-block: 76px 64px;
  background: var(--cp-paper);
}

.cp-hero::before {
  content: "火";
  position: absolute;
  top: -10%;
  right: -4%;
  z-index: 0;
  color: var(--cp-ink);
  opacity: 0.05;
  font-size: min(64vw, 620px);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.cp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.cp-hero h1 {
  font-size: clamp(2.1rem, 6.4vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.28;
  text-wrap: balance;
}

.cp-hero-lead {
  max-width: 620px;
  margin-top: 26px;
  color: var(--cp-muted);
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  line-height: 1.9;
  word-break: keep-all;
}

.cp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 38px;
}

.cp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: var(--cp-red);
  color: var(--cp-ivory);
  font-size: 0.92rem;
  font-weight: 700;
  transition:
    translate 180ms var(--cp-ease),
    background 180ms ease;
}

.cp-button:hover {
  translate: 0 -2px;
  background: var(--cp-red-dark);
}

.cp-button--outline {
  background: transparent;
  border-color: var(--cp-ink);
  color: var(--cp-ink);
}

.cp-button--outline:hover {
  background: var(--cp-ink);
  color: var(--cp-ivory);
}

.cp-button--light {
  background: var(--cp-ivory);
  color: var(--cp-ink);
}

.cp-button--light:hover {
  background: var(--cp-copper);
  color: var(--cp-ink);
}

.cp-text-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  font-weight: 700;
  transition: gap 180ms var(--cp-ease), color 180ms ease;
}

.cp-text-link:hover {
  gap: 20px;
  color: var(--cp-red);
}

.cp-text-link--light:hover {
  color: var(--cp-copper);
}

/* ---------------------------------------------------------------------- */
/* Story section                                                          */
/* ---------------------------------------------------------------------- */

.cp-story {
  padding-block: 64px;
  border-block: 1px solid var(--cp-line);
  background: var(--cp-paper-deep);
}

.cp-story-grid {
  display: grid;
  gap: 28px;
}

.cp-story h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-wrap: balance;
}

.cp-story-copy {
  display: grid;
  gap: 18px;
  max-width: 640px;
  margin-top: 22px;
  color: var(--cp-ink-soft);
  font-size: 1rem;
  line-height: 1.9;
  word-break: keep-all;
}

.cp-story blockquote {
  margin-top: 30px;
  padding: 22px 0 22px 22px;
  border-left: 2px solid var(--cp-red);
  color: var(--cp-ink);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.6;
}

@media (min-width: 1024px) {
  .cp-story {
    padding-block: 96px;
  }

  .cp-story-grid {
    grid-template-columns: minmax(160px, 1fr) minmax(0, 2.4fr);
    gap: 48px;
  }
}

/* ---------------------------------------------------------------------- */
/* Work / business area section                                          */
/* ---------------------------------------------------------------------- */

.cp-work {
  padding-block: 64px;
  background: var(--cp-paper-bright);
}

.cp-work-head {
  max-width: 640px;
}

.cp-work-head h2 {
  margin-top: 4px;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.28;
}

.cp-work-head p {
  margin-top: 18px;
  color: var(--cp-muted);
  font-size: 1rem;
  line-height: 1.85;
  word-break: keep-all;
}

.cp-work-grid {
  display: grid;
  gap: 16px;
  margin-top: 44px;
}

.cp-work-item {
  padding: 30px 26px;
  border: 1px solid var(--cp-line);
  border-radius: 3px;
  background: var(--cp-paper);
}

.cp-work-item h3 {
  margin-top: 16px;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cp-work-item p {
  margin-top: 12px;
  color: var(--cp-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  word-break: keep-all;
}

.cp-work-item--featured {
  grid-column: 1 / -1;
  padding: 40px 32px;
  background: var(--cp-ink);
  color: var(--cp-ivory);
}

.cp-work-item--featured .cp-index {
  color: var(--cp-copper);
}

.cp-work-item--featured p {
  color: rgba(255, 244, 226, 0.72);
}

@media (min-width: 640px) {
  .cp-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cp-work {
    padding-block: 96px;
  }

  .cp-work-item--featured {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: 12px 40px;
    padding: 52px;
  }

  .cp-work-item--featured .cp-index,
  .cp-work-item--featured h3 {
    grid-column: 1;
  }

  .cp-work-item--featured p {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    max-width: 46ch;
  }
}

/* ---------------------------------------------------------------------- */
/* Inside entry section                                                   */
/* ---------------------------------------------------------------------- */

.cp-inside {
  position: relative;
  overflow: hidden;
  padding-block: 64px;
  background: var(--cp-ink);
  color: var(--cp-ivory);
}

.cp-inside::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 82% 18%, rgba(232, 98, 42, 0.16), transparent 42%);
  pointer-events: none;
}

.cp-inside-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 40px;
}

.cp-inside-copy .cp-eyebrow {
  color: var(--cp-copper);
}

.cp-inside-wordmark {
  width: min(280px, 62vw);
  height: auto;
  margin-bottom: 22px;
}

.cp-inside-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.4;
  word-break: keep-all;
}

.cp-inside-copy p {
  margin-top: 18px;
  max-width: 52ch;
  color: rgba(255, 244, 226, 0.72);
  font-size: 1rem;
  line-height: 1.9;
  word-break: keep-all;
}

.cp-inside-actions {
  margin-top: 32px;
}

.cp-inside-card {
  position: relative;
  border: 1px solid var(--cp-line-light);
  border-radius: 3px;
  overflow: hidden;
  background: var(--cp-ink-soft);
}

.cp-inside-card img {
  width: 100%;
  height: auto;
}

.cp-inside-card figcaption {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--cp-line-light);
}

.cp-inside-card .cp-inside-ep {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cp-inside-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.cp-inside-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.cp-inside-card span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 244, 226, 0.62);
  font-size: 0.85rem;
}

@media (min-width: 1024px) {
  .cp-inside {
    padding-block: 100px;
  }

  .cp-inside-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: center;
    gap: 72px;
  }
}

/* ---------------------------------------------------------------------- */
/* Contact section                                                        */
/* ---------------------------------------------------------------------- */

.cp-contact {
  padding-block: 64px;
  background: var(--cp-paper-bright);
}

.cp-contact-inner {
  max-width: 620px;
}

.cp-contact-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cp-contact-inner p {
  margin-top: 16px;
  color: var(--cp-muted);
  font-size: 1rem;
  line-height: 1.9;
  word-break: keep-all;
}

.cp-contact-actions {
  margin-top: 28px;
}

@media (min-width: 1024px) {
  .cp-contact {
    padding-block: 88px;
  }
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.cp-footer {
  padding-block: 48px 28px;
  background: var(--cp-ink);
  color: var(--cp-ivory);
}

.cp-footer-grid {
  display: grid;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--cp-line-light);
}

.cp-footer-brand-plate {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 2px;
  background: rgba(251, 248, 242, 0.96);
}

.cp-footer-brand-plate img {
  height: 30px;
  width: auto;
}

.cp-footer-brand p {
  max-width: 42ch;
  margin-top: 14px;
  color: rgba(255, 244, 226, 0.56);
  font-size: 0.88rem;
  line-height: 1.7;
  word-break: keep-all;
}

.cp-footer-nav {
  display: grid;
  gap: 28px;
}

.cp-footer-nav strong {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 244, 226, 0.42);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.cp-footer-nav a {
  display: block;
  min-height: 32px;
  padding-block: 4px;
  color: rgba(255, 244, 226, 0.78);
  font-size: 0.9rem;
}

.cp-footer-nav a:hover {
  color: var(--cp-copper);
}

.cp-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  color: rgba(255, 244, 226, 0.4);
  font-size: 0.78rem;
}

.cp-footer-bottom a {
  color: rgba(255, 244, 226, 0.6);
}

.cp-footer-bottom a:hover {
  color: var(--cp-copper);
}

@media (min-width: 640px) {
  .cp-footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cp-footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* ---------------------------------------------------------------------- */
/* 404 page                                                                */
/* ---------------------------------------------------------------------- */

body.cp-page--404 {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--cp-ink);
  color: var(--cp-ivory);
}

.cp-404-header {
  min-height: var(--cp-header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--cp-line-light);
}

.cp-404-brand-plate {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 2px;
  background: rgba(251, 248, 242, 0.96);
}

.cp-404-brand-plate img {
  height: 34px;
  width: auto;
}

.cp-404-main {
  position: relative;
  display: flex;
  align-items: center;
  padding-block: 64px;
  overflow: hidden;
}

.cp-404-main::before {
  content: "火";
  position: absolute;
  top: -18%;
  left: -10%;
  z-index: 0;
  color: var(--cp-ivory);
  opacity: 0.04;
  font-size: min(90vw, 640px);
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

.cp-404-body {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.cp-404-kicker {
  margin-bottom: 20px;
  color: var(--cp-copper);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.cp-404-index {
  margin: 0 0 8px;
  color: rgba(255, 244, 226, 0.18);
  font-size: clamp(4.5rem, 18vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.cp-404-body h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.4;
  word-break: keep-all;
}

.cp-404-body p {
  margin-top: 20px;
  max-width: 52ch;
  color: rgba(255, 244, 226, 0.7);
  font-size: 1rem;
  line-height: 1.9;
  word-break: keep-all;
}

.cp-404-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 36px;
}

.cp-404-footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--cp-line-light);
  color: rgba(255, 244, 226, 0.4);
  font-size: 0.78rem;
}

.cp-404-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  width: 100%;
}

/* ---------------------------------------------------------------------- */
/* Reduced motion & dark scheme                                          */
/* ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body.cp-page * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  body.cp-page {
    background: var(--cp-ink);
    color: var(--cp-ivory);
  }

  /* Header stays on its light paper plate in every scheme: the brush
     wordmark is dark ink on a transparent field and needs a light
     surface to stay legible. */

  .cp-hero,
  .cp-work,
  .cp-contact {
    background: var(--cp-ink);
  }

  .cp-hero::before {
    color: var(--cp-ivory);
  }

  .cp-hero-lead,
  .cp-work-head p,
  .cp-work-item p,
  .cp-contact-inner p {
    color: rgba(255, 244, 226, 0.68);
  }

  .cp-button--outline {
    border-color: var(--cp-ivory);
    color: var(--cp-ivory);
  }

  .cp-button--outline:hover {
    background: var(--cp-ivory);
    color: var(--cp-ink);
  }

  .cp-story {
    background: var(--cp-ink-soft);
    border-color: var(--cp-line-light);
  }

  .cp-story-copy {
    color: rgba(255, 244, 226, 0.78);
  }

  .cp-story h2 {
    color: var(--cp-ivory);
  }

  .cp-work-item {
    background: var(--cp-ink-soft);
    border-color: var(--cp-line-light);
    color: var(--cp-ivory);
  }

  .cp-work-head h2,
  .cp-contact-inner h2 {
    color: var(--cp-ivory);
  }
}
