/* ==========================================================
   PorteKorea — styles
   Change the brand colors and fonts in :root below.
   ========================================================== */

:root {
  --paper: #f2efe8;      /* warm off-white */
  --ink: #141414;        /* near-black, matches the logo */
  --muted: #6b675f;
  --line: rgba(20, 20, 20, 0.14);

  --font-sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --container: 1200px;
  --gutter: clamp(16px, 5vw, 64px);
  --section-space: clamp(72px, 12vw, 152px);
}

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

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

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

/* Subtle paper grain for the retro feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Korean: don't break words in the middle */
html:lang(ko) body { word-break: keep-all; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.label, .lang-switch, .brand-role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}
.brand img { height: 36px; width: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button {
  font: inherit;
  letter-spacing: inherit;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 var(--section-space); overflow: hidden; }
.hero-text { max-width: 960px; }
.hero .label { color: var(--muted); margin-bottom: 28px; }
.hero h1 { font-size: clamp(2.8rem, 7.6vw, 6.6rem); }
.hero .lead { margin: 28px 0 40px; max-width: 34em; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: var(--section-space) 0; border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }
.section-intro { max-width: 40em; font-size: 1.15rem; color: var(--muted); margin: -16px 0 48px; }

/* Brands */
.brand-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.brand-row { padding: 32px 0 36px; border-bottom: 1px solid var(--ink); }
.brand-name {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2em;
  padding-bottom: 4px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-decoration: none;
  /* Underline drawn left to right on hover */
  background: linear-gradient(currentColor, currentColor) left bottom / 0% 2px no-repeat;
  transition: background-size 0.35s ease;
}
.brand-name:hover, .brand-name:focus-visible { background-size: 100% 2px; }
.brand-name .arrow { font-size: 0.75em; font-weight: 500; transition: transform 0.2s; }
.brand-name:hover .arrow { transform: translate(2px, -2px); }
.brand-role { display: block; margin-top: 10px; color: var(--muted); }
.brand-desc { margin-top: 24px; max-width: 36em; color: var(--muted); }

/* Services */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service {
  padding: clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.service h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.service p { color: var(--muted); font-size: 16px; }

/* Story — inverted */
.story {
  color: var(--paper);
  border-top: 0;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(20, 20, 20, 0.72), rgba(20, 20, 20, 0.72)),
    url("/assets/images/seoul-skyline.jpg");
  background-size: cover;
  background-position: center 75%;
}
.story-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.story-logo {
  width: 100%;
  aspect-ratio: 1000 / 574;
  background: var(--paper);
  -webkit-mask: url("/assets/logo/portekorea-logo-black.svg") center / contain no-repeat;
  mask: url("/assets/logo/portekorea-logo-black.svg") center / contain no-repeat;
}
.story p { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: rgba(242, 239, 232, 0.75); max-width: 32em; }
.story p + p { margin-top: 20px; }

/* Contact */
.contact h2 { font-size: clamp(2.8rem, 8vw, 6.5rem); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer-info { text-align: right; font-size: 13px; color: var(--muted); }

/* ---------- Scroll fade-in ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .story-inner { grid-template-columns: 1fr; }
  .story-logo { max-width: 260px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .lang-switch { margin-left: auto; }
  .services { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-info { text-align: left; }
}
