/*
Theme Name: Codegen Studio
Theme URI: https://webcodegenstudio.com/
Author: Codegen Studio
Description: Custom one-page portfolio theme for Codegen Studio.
Version: 1.2.0
Text Domain: codegen-studio
*/

:root {
  --ink: #152326;
  --muted: #5c6868;
  --brand: #00685f;
  --brand-dark: #004f49;
  --orange: #ed6d2d;
  --blue: #3f70ec;
  --paper: #fffdf8;
  --line: #e6e5df;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(17, 49, 44, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif; line-height: 1.65; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.cg-container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.cg-section { padding: 82px 0; scroll-margin-top: 80px; }
.cg-eyebrow { margin: 0 0 10px; color: var(--brand); font-size: 13px; font-weight: 900; letter-spacing: .19em; text-transform: uppercase; }
.cg-title { margin: 0 0 22px; font-size: clamp(34px, 5vw, 60px); line-height: 1.13; letter-spacing: -.045em; }
.cg-section-title { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.2; letter-spacing: -.035em; }
.cg-lead { max-width: 650px; color: var(--muted); font-size: 18px; }
.cg-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 25px; border: 1px solid var(--brand); border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; text-decoration: none; transition: .2s ease; }
.cg-button:hover, .cg-button:focus-visible { transform: translateY(-2px); background: var(--brand-dark); box-shadow: 0 10px 24px rgba(0, 104, 95, .2); }
.cg-button--outline { background: transparent; color: var(--brand); }
.cg-button--outline:hover, .cg-button--outline:focus-visible { color: #fff; }

.cg-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid rgba(230,229,223,.9); background: rgba(255,253,248,.92); backdrop-filter: blur(14px); }
.cg-header-inner { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 28px; }
.cg-logo { color: var(--ink); font-size: 25px; font-weight: 950; letter-spacing: -.04em; text-decoration: none; }
.cg-logo span { color: var(--brand); }
.cg-logo small { display: block; margin-top: -7px; color: #758080; font-size: 8px; letter-spacing: .12em; }
.cg-nav { display: flex; align-items: center; gap: 22px; }
.cg-nav a { position: relative; font-size: 14px; font-weight: 700; text-decoration: none; }
.cg-nav a:not(.cg-button)::after { position: absolute; right: 0; bottom: -10px; left: 0; height: 2px; background: var(--brand); content: ""; transform: scaleX(0); transition: transform .2s; }
.cg-nav a:hover::after, .cg-nav a:focus-visible::after { transform: scaleX(1); }
.cg-menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 21px; }

.cg-hero { position: relative; overflow: hidden; padding: 70px 0 82px; background: radial-gradient(circle at 84% 25%, #d8e6d5 0, transparent 26%), linear-gradient(110deg, #fffdf8 0%, #f4f1e9 65%, #e9eee4 100%); }
.cg-hero::after { position: absolute; right: -60px; bottom: -130px; width: 350px; height: 350px; border-radius: 50%; background: rgba(124,160,116,.16); content: ""; filter: blur(5px); }
.cg-hero-grid { display: grid; align-items: center; grid-template-columns: .78fr 1.22fr; gap: 55px; }
.cg-hero-copy { position: relative; z-index: 2; }
.cg-hero-copy strong { color: var(--brand); }
.cg-hero-tags { margin: 22px 0 28px; color: #354442; font-size: 14px; font-weight: 700; }
.cg-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cg-device-stage { position: relative; min-height: 420px; }
.cg-laptop { position: absolute; top: 24px; right: 70px; overflow: hidden; width: 76%; padding: 9px 9px 19px; border: 7px solid #182124; border-radius: 16px 16px 7px 7px; background: #fff; box-shadow: var(--shadow); }
.cg-laptop::after { position: absolute; right: -40px; bottom: -18px; left: -40px; height: 18px; border-radius: 3px 3px 14px 14px; background: linear-gradient(#dadbd8, #9fa6a3); content: ""; }
.cg-screen-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: var(--brand); font-size: 11px; font-weight: 900; }
.cg-screen-tabs { display: flex; gap: 20px; padding: 8px 0; border-block: 1px solid #ecece8; font-size: 8px; font-weight: 900; }
.cg-screen-search { margin: 10px 0; padding: 7px 10px; border: 1px solid #e3e8e5; border-radius: 5px; color: #9aa5a3; font-size: 8px; }
.cg-product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cg-product { min-width: 0; }
.cg-product-art { aspect-ratio: 1; border-radius: 5px; background: linear-gradient(145deg, #e7ddd0, #a5b5a4); }
.cg-product:nth-child(2) .cg-product-art { background: linear-gradient(145deg, #c6d4db, #7c8d95); }
.cg-product:nth-child(3) .cg-product-art { background: linear-gradient(145deg, #dce8c8, #78966d); }
.cg-product:nth-child(4) .cg-product-art { background: linear-gradient(145deg, #eee1cb, #857460); }
.cg-product b, .cg-product small { display: block; overflow: hidden; margin-top: 4px; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.cg-phone { position: absolute; z-index: 3; right: 0; bottom: 22px; width: 25%; padding: 11px 7px 16px; border: 6px solid #172024; border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.cg-phone::before { display: block; width: 42%; height: 5px; margin: -7px auto 9px; border-radius: 0 0 6px 6px; background: #172024; content: ""; }
.cg-phone .cg-product-grid { grid-template-columns: repeat(2, 1fr); }
.cg-site-preview { display: block; width: 100%; height: auto; }
.cg-laptop .cg-site-preview { aspect-ratio: 1.7 / 1; object-fit: cover; object-position: top center; }
.cg-phone-screen { display: flex; overflow: hidden; aspect-ratio: .52 / 1; border-radius: 16px; background: #fff; justify-content: center; }
.cg-phone .cg-site-preview { width: 330%; max-width: none; height: 100%; object-fit: cover; object-position: top left; }
.cg-phone .cg-site-preview--mobile { width: 100%; max-width: 100%; height: 100%; margin-inline: auto; object-fit: cover; object-position: top center; }
.cg-handnote { position: absolute; z-index: 4; top: -5px; right: -10px; width: 120px; color: #263634; font-family: cursive; font-size: 21px; line-height: 1.05; transform: rotate(-7deg); }

.cg-feature { border-bottom: 1px solid var(--line); }
.cg-feature-grid { display: grid; align-items: center; grid-template-columns: .88fr 1.12fr; gap: 64px; }
.cg-project-name { margin: 0; font-size: clamp(38px, 5vw, 55px); line-height: 1; }
.cg-project-sub { margin: 8px 0 22px; color: var(--brand); font-size: 20px; font-weight: 800; }
.cg-feature-panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 14px; padding: 35px; border-radius: var(--radius); background: linear-gradient(135deg, #f6f8f5, #edf3f0); }
.cg-feature-item { text-align: center; }
.cg-feature-icon { display: grid; width: 42px; height: 42px; margin: auto auto 8px; place-items: center; border: 1px solid #b7d0c9; border-radius: 14px; color: var(--brand); font-size: 21px; }
.cg-feature-item b { display: block; font-size: 14px; }
.cg-feature-item small { color: var(--muted); font-size: 11px; }
.cg-panel-note { grid-column: 1 / -1; margin: 5px 0 -4px; text-align: center; font-family: cursive; font-size: 20px; transform: none; }

.cg-section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.cg-section-head p { max-width: 390px; margin: 0; color: var(--muted); }
.cg-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cg-card { padding: 25px 22px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.75); box-shadow: 0 7px 22px rgba(21,35,38,.04); }
.cg-card-icon { display: grid; width: 50px; height: 50px; margin-bottom: 15px; place-items: center; border-radius: 50%; background: #fff0e8; color: var(--orange); font-size: 25px; }
.cg-card:nth-child(2) .cg-card-icon { color: #e24935; }
.cg-card:nth-child(3) .cg-card-icon { background: #e8efff; color: var(--blue); }
.cg-card:nth-child(4) .cg-card-icon { background: #e5f1ed; color: var(--brand); }
.cg-card h3 { margin: 0 0 6px; font-size: 18px; }
.cg-card p { margin: 0; color: var(--muted); font-size: 14px; }

.cg-work { background: linear-gradient(180deg, #fbfaf6, #f5f3ed); }
.cg-demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cg-demo { display: grid; overflow: hidden; grid-template-columns: 115px 1fr; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 22px rgba(21,35,38,.05); }
.cg-demo-art { min-height: 125px; background: linear-gradient(135deg, #e9ddd4, #a98d7c); }
.cg-demo:nth-child(2) .cg-demo-art { background: linear-gradient(135deg, #f1d8aa, #af4f2b); }
.cg-demo-copy { padding: 17px; }
.cg-demo h3 { margin: 0 0 6px; font-size: 15px; }
.cg-demo p { margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.cg-demo a { color: var(--brand); font-size: 12px; font-weight: 800; text-decoration: none; }

.cg-contact { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(237,248,251,.92), rgba(216,235,239,.9)); }
.cg-contact::after { position: absolute; right: -5%; bottom: -120px; width: 55%; height: 280px; border-radius: 50% 0 0 0; background: linear-gradient(155deg, transparent 20%, #b7c7bd 21%, #7c968b 48%, #59776e); content: ""; opacity: .72; }
.cg-contact-inner { position: relative; z-index: 2; display: grid; align-items: end; grid-template-columns: 1fr .8fr; gap: 40px; }
.cg-quote { justify-self: end; max-width: 340px; font-family: cursive; font-size: 25px; text-align: center; transform: rotate(-4deg); }
.cg-footer { padding: 22px 0; background: var(--brand-dark); color: #dce8e5; font-size: 12px; }
.cg-footer-inner { display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 1050px) {
  .cg-menu-toggle { display: block; }
  .cg-nav { position: absolute; top: 76px; right: 0; left: 0; display: none; padding: 22px; border-bottom: 1px solid var(--line); background: #fffdf8; flex-direction: column; align-items: stretch; gap: 16px; }
  .cg-nav.open { display: flex; }
  .cg-nav .cg-button { width: 100%; }
  .cg-hero-grid, .cg-feature-grid, .cg-contact-inner { grid-template-columns: 1fr; }
  .cg-device-stage { width: min(680px, 100%); margin: auto; }
  .cg-card-grid { grid-template-columns: repeat(2, 1fr); }
  .cg-demo-grid { grid-template-columns: 1fr; }
  .cg-quote { justify-self: start; }
}

@media (max-width: 600px) {
  .cg-container { width: min(100% - 28px, 1160px); }
  .cg-section { padding: 58px 0; }
  .cg-hero { padding-top: 45px; }
  .cg-device-stage { min-height: 305px; }
  .cg-laptop { right: 10%; width: 76%; }
  .cg-phone { right: 0; bottom: 4px; left: auto; width: 25%; margin-inline: 0; }
  .cg-handnote { display: block; right: -10px; left: auto; transform: rotate(-7deg); }
  .cg-feature-panel { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; padding: 20px 16px 16px; }
  .cg-panel-note { margin: 0; }
  .cg-section-head { align-items: flex-start; flex-direction: column; }
  .cg-card-grid { grid-template-columns: 1fr; }
  .cg-demo { grid-template-columns: 90px 1fr; }
  .cg-footer-inner { flex-direction: column; }
}

/* AnabadaUS advertising page */
.cg-ads-intro { max-width: 1040px; }
.cg-ads .cg-title { font-size: clamp(32px, 4.5vw, 54px); line-height: 1.3; word-break: keep-all; }
.cg-ads .cg-title strong { color: var(--brand); }
.cg-ads-note { margin: 24px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.cg-ads-placement { margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.cg-ads-preview-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--brand); font-weight: 800; }
.cg-ads-preview-top span { color: var(--muted); font-size: 13px; }
.cg-ads-content-label { display: grid; min-height: 140px; margin: 20px 0; place-items: center; border-radius: 10px; background: #f4f3ed; color: var(--muted); text-align: center; }
.cg-ads-slot { display: grid; gap: 8px; padding: 24px 16px; border: 2px dashed #71a79a; border-radius: 10px; background: #edf5ef; text-align: center; }
.cg-ads-slot strong { color: var(--brand); font-size: 23px; }
.cg-ads-slot small, .cg-ads-slot span, .cg-ads-placement figcaption { color: var(--muted); font-size: 13px; }
.cg-ads-placement figcaption { margin-top: 16px; }
.cg-ads-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin: 32px 0 0; padding-left: 24px; }
.cg-ads-steps li { padding: 12px; }
.cg-ads-steps li::marker { color: var(--brand); font-weight: 800; }
.cg-ads-steps h3 { margin: 0 0 10px; }
.cg-ads-steps p { margin: 0; color: var(--muted); }
.cg-ads-inquiry { position: relative; z-index: 2; }
.cg-nav a[aria-current="page"] { color: var(--brand); }
.cg-nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (max-width: 700px) { .cg-ads-steps { grid-template-columns: 1fr; gap: 16px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .cg-button, .cg-nav a::after { transition: none; } }
