/* ===================================================
   Coastline Collective — Brand Stylesheet
   Editorial, upscale styling inspired by the brand guide:
   generous whitespace, hairline borders, tracked small
   caps labels, serif headings, no icons/emoji, restrained
   color use.

   Palette: Deep Sea #1B3A44 | Tide #2F7FB9 | Seafoam #84BFC6
            Sand Gold #A8946A | Shell #F7F2E8
   Fonts: Pinyon Script (accent) | Cormorant Garamond (headings)
          Hanken Grotesk (body/UI)
=================================================== */

:root {
  --deep-sea: #1B3A44;
  --tide: #2F7FB9;
  --seafoam: #84BFC6;
  --sand-gold: #A8946A;
  --shell: #F7F2E8;
  --white: #FFFFFF;
  --hairline: rgba(27, 58, 68, 0.14);

  --font-script: 'Pinyon Script', cursive;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Hanken Grotesk', sans-serif;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--shell);
  color: var(--deep-sea);
  line-height: 1.7;
  font-weight: 400;
}

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

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

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

.eyebrow {
  font-family: var(--font-body);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sand-gold);
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--shell);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark .shell-icon {
  height: 26px;
  width: auto;
  display: block;
}

.hero .hero-shell {
  height: 70px;
  width: auto;
  margin: 0 auto 18px;
  opacity: 0.92;
}

.brand-mark .script {
  font-family: var(--font-script);
  color: var(--tide);
  font-size: 1.9rem;
  line-height: 1;
}

.brand-mark .caps {
  font-family: var(--font-heading);
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--deep-sea);
  font-weight: 600;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 40px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--deep-sea);
  padding-bottom: 5px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--tide);
  border-bottom-color: var(--sand-gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 26px;
  height: 18px;
  padding: 0;
  position: relative;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--deep-sea);
}
.nav-toggle::before { top: 0; }
.nav-toggle span { top: 8px; }
.nav-toggle::after { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  max-width: 100%;
  padding: 15px 34px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid currentColor;
  background: transparent;
  overflow-wrap: anywhere;
  white-space: normal;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn-primary {
  color: var(--shell);
  border-color: var(--shell);
}
.btn-primary:hover { background: var(--shell); color: var(--deep-sea); }

.btn-outline {
  color: var(--deep-sea);
  border-color: var(--deep-sea);
}
.btn-outline:hover { background: var(--deep-sea); color: var(--shell); }

.btn-tide {
  color: var(--tide);
  border-color: var(--tide);
}
.btn-tide:hover { background: var(--tide); color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  background: var(--deep-sea);
  color: var(--shell);
  padding: 130px 32px 140px;
  text-align: center;
}

.hero .script {
  font-family: var(--font-script);
  font-size: 5.5rem;
  color: var(--seafoam);
  line-height: 1;
  display: block;
}

.hero .caps {
  font-family: var(--font-heading);
  letter-spacing: 0.4em;
  font-size: 1.9rem;
  color: var(--white);
  margin: 14px 0 22px;
  font-weight: 500;
}

.hero .tagline {
  font-family: var(--font-body);
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--sand-gold);
  text-transform: uppercase;
  margin-bottom: 40px;
}

.hero p.lead {
  max-width: 520px;
  margin: 0 auto 44px;
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(247, 242, 232, 0.82);
}

/* ---------- Sections ---------- */
section { padding: 100px 32px; }

.section-head {
  text-align: center;
  margin-bottom: 64px;
}

.section-head .eyebrow { display: block; margin-bottom: 14px; }

.section-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 2.4rem;
  color: var(--deep-sea);
  margin: 0;
}

.rule {
  width: 48px;
  height: 1px;
  background: var(--sand-gold);
  margin: 26px auto 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}

.card {
  padding: 46px 38px;
  text-align: center;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.card .index {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--sand-gold);
  letter-spacing: 0.2em;
  margin-bottom: 18px;
  display: block;
}

.card h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 14px;
}

.card p {
  font-size: 0.92rem;
  color: #4b6169;
  font-weight: 300;
}

.about-copy {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  color: #3f565d;
  font-size: 1.02rem;
  font-weight: 300;
}

.cta-band {
  background: var(--deep-sea);
  color: var(--shell);
  text-align: center;
  padding: 90px 32px;
}

.cta-band .eyebrow { color: var(--seafoam); }

.cta-band h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 2rem;
  color: var(--white);
  margin: 14px 0 34px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--shell);
  color: #4b6169;
  text-align: center;
  padding: 56px 32px 44px;
  font-size: 0.82rem;
  border-top: 1px solid var(--hairline);
}

.site-footer .script {
  font-family: var(--font-script);
  color: var(--tide);
  font-size: 1.7rem;
  display: block;
  margin-bottom: 12px;
}

.site-footer a { color: var(--tide); font-weight: 600; }

/* ---------- Client Portal ---------- */
.portal-hero {
  background: var(--deep-sea);
  color: var(--shell);
  text-align: center;
  padding: 100px 32px 60px;
}

.portal-hero .eyebrow { color: var(--seafoam); display: block; margin-bottom: 16px; }

.portal-hero h1 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 2.6rem;
  margin: 0 0 16px;
}

.portal-hero p {
  color: rgba(247, 242, 232, 0.78);
  max-width: 480px;
  margin: 0 auto;
  font-weight: 300;
  font-size: 0.95rem;
}

.client-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 auto;
  max-width: 640px;
  border-left: 1px solid var(--hairline);
}

.client-tab-btn {
  flex: 1;
  min-width: 220px;
  background: var(--white);
  border: none;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  color: var(--deep-sea);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 26px 20px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.client-tab-btn:hover {
  background: var(--shell);
}

.client-tab-btn.selected {
  background: var(--deep-sea);
  color: var(--shell);
}

.client-tab-btn .status {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.65;
}

.portal-panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 32px 120px;
}

.gate-box {
  background: var(--white);
  border: 1px solid var(--hairline);
  padding: 56px 44px;
  text-align: center;
}

.gate-box .eyebrow { display: block; margin-bottom: 14px; }

.gate-box h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0 0 8px;
}

.gate-box p.hint {
  color: #5a7078;
  font-size: 0.88rem;
  font-weight: 300;
  margin-bottom: 28px;
}

.gate-box input[type="password"] {
  width: 100%;
  max-width: 280px;
  padding: 13px 16px;
  border: 1px solid var(--hairline);
  background: var(--shell);
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.gate-box input[type="password"]:focus {
  outline: none;
  border-color: var(--tide);
}

.gate-error {
  color: #a1452f;
  font-size: 0.82rem;
  min-height: 18px;
  margin-bottom: 10px;
  font-weight: 500;
}

.dashboard {
  background: var(--white);
  border: 1px solid var(--hairline);
}

.dashboard-header {
  background: var(--deep-sea);
  color: var(--shell);
  padding: 30px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-header h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0;
}

.lock-btn {
  background: transparent;
  border: 1px solid var(--seafoam);
  color: var(--shell);
  padding: 9px 18px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lock-btn:hover { background: rgba(132,191,198,0.15); }

.sub-tabs {
  display: flex;
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
}

.sub-tab-btn {
  flex: 1;
  min-width: 130px;
  background: var(--shell);
  border: none;
  border-right: 1px solid var(--hairline);
  border-bottom: 2px solid transparent;
  padding: 18px 14px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a7078;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.sub-tab-btn.active {
  color: var(--tide);
  border-bottom-color: var(--sand-gold);
  background: var(--white);
}

.tab-label {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tab-label-inner {
  display: inline-block;
  white-space: nowrap;
}

.sub-tab-btn.marquee .tab-label-inner {
  animation: tabMarquee 6s linear infinite;
}

@keyframes tabMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.sub-panel { padding: 38px; display: none; }
.sub-panel.active { display: block; }

.sub-panel h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 24px;
}

.item-list { list-style: none; margin: 0; padding: 0; }

.item-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.9rem;
  font-weight: 300;
}

.item-list li:last-child { border-bottom: none; }

.item-list li span:first-child::before {
  content: "\2014";
  color: var(--sand-gold);
  margin-right: 10px;
  font-weight: 400;
}

.item-list li a {
  color: var(--tide);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.item-list li a:hover {
  border-bottom-color: var(--tide);
}

.item-list .meta {
  color: var(--sand-gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: var(--font-body);
}

.tag {
  display: inline;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tag.due { color: var(--sand-gold); }
.tag.paid { color: #3d7a45; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  nav.main-nav { display: none; }
  nav.main-nav.open { display: block; }
  .nav-toggle { display: block; }
  .nav-wrap { flex-wrap: wrap; }
  nav.main-nav ul { flex-direction: column; gap: 18px; padding: 24px 0 8px; width: 100%; }
  .hero { padding: 90px 24px 100px; }
  .hero .script { font-size: 3.6rem; }
  .hero .caps { font-size: 1.2rem; letter-spacing: 0.26em; }
  section { padding: 70px 24px; }
  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .client-tab-btn { min-width: 100%; }

  .cta-band .btn {
    padding: 16px 20px;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
  }
}
