/* Isleborn home page */
/* Fonts are hosted on this site (SIL Open Font License, see fonts/) */
@font-face { font-family: "IM Fell English"; src: url(../fonts/im-fell-english-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url(../fonts/karla-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url(../fonts/karla-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Karla"; src: url(../fonts/karla-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --deep: #0e3b43;      /* open water */
  --shallow: #2f8c8a;   /* shallows */
  --sand: #ebd9af;      /* the beach */
  --sand-dark: #d6c294;
  --palm: #3e6b2f;      /* jungle */
  --ember: #f29e38;     /* campfire: the one thing you press */
  --ink: #15292d;       /* text on sand */
  --foam: #f6efdc;      /* text on water */
  --display: "IM Fell English", Georgia, "Times New Roman", serif;
  --body: "Karla", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--deep); color: var(--foam); font: 400 1.0625rem/1.6 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, .mark { font-family: var(--display); font-weight: 400; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1.02; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; }
h3 { font-size: 1.75rem; line-height: 1.15; margin-bottom: .4rem; }
p { margin: 0 0 1rem; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }
.intro { max-width: 60ch; font-size: 1.15rem; margin-top: .9rem; opacity: .9; }

/* header sits on the hero */
.top { position: absolute; inset: 0 0 auto 0; z-index: 3; display: flex; align-items: center; gap: 28px; padding: 18px clamp(16px, 4vw, 48px); }
.top .mark { font-size: 1.9rem; text-decoration: none; color: var(--foam); margin-right: auto; }
.top nav { display: flex; gap: 22px; }
.top nav a { text-decoration: none; color: var(--foam); opacity: .85; font-weight: 500; }
.top nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.play { display: inline-block; background: var(--ember); color: #2a1503; text-decoration: none; font-weight: 700; padding: 15px 26px; border-radius: 999px; font-size: 1.1rem; box-shadow: 0 0 0 0 rgba(242,158,56,.0); transition: transform .15s, box-shadow .2s; }
.play:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(242,158,56,.45); }
.play.small { padding: 10px 20px; font-size: 1rem; }
.quiet { color: var(--foam); font-weight: 500; text-underline-offset: 5px; }

/* hero: the island itself */
.hero { position: relative; min-height: min(92vh, 860px); display: grid; align-items: end; overflow: hidden; background: var(--deep); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 60%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,40,46,.86) 0%, rgba(10,40,46,.55) 42%, rgba(10,40,46,0) 72%), linear-gradient(0deg, rgba(10,40,46,.55), rgba(10,40,46,0) 40%); }
.hero-text { position: relative; z-index: 2; padding: 0 clamp(16px, 4vw, 48px) clamp(80px, 12vh, 140px); max-width: 760px; animation: rise 1.1s ease-out both .2s; }
.lede { font-size: clamp(1.15rem, 1.9vw, 1.4rem); max-width: 34ch; margin: 1.1rem 0 1.8rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.fine { font-size: .95rem; opacity: .8; margin-top: 1.4rem; max-width: 46ch; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-text { animation: none; } }

/* the wave where the sea meets the sand */
.shore { margin-top: -88px; position: relative; z-index: 2; line-height: 0; }
.shore svg { width: 100%; height: 90px; }

/* sand sections */
.sand { background: var(--sand); color: var(--ink); padding: 40px 0 110px; }
.sand .intro { opacity: 1; }
.moment { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; margin-top: 72px; }
.moment img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 18px 40px -18px rgba(21,41,45,.55); }
.moment p { max-width: 42ch; font-size: 1.1rem; }
.moment.flip img, .moment.flip .concept { order: 2; }
.concept { position: relative; margin: 0; }
.concept span { position: absolute; left: 12px; top: 12px; background: rgba(14,59,67,.85); color: #f6efdc; font: 700 12px/1 Karla, Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: 7px 10px; border-radius: 99px; }

/* water sections */
.sea { background: var(--deep); padding: 100px 0; }
.profile { margin: 48px auto 0; width: min(1200px, 100%); padding: 0 16px; }
.profile svg { width: 100%; height: auto; display: block; }
.pins circle { fill: var(--foam); stroke: var(--deep); stroke-width: 3; }
.pins circle.now { fill: var(--ember); stroke: #fff2d6; stroke-width: 3; }
.stages { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: s; }
.stages li { border-top: 2px solid rgba(246,239,220,.25); padding-top: 12px; font-size: .98rem; }
.stages strong { display: block; font: 400 1.5rem/1.1 var(--display); margin-bottom: 4px; }
.stages span { opacity: .78; }
.stages li.now { border-top-color: var(--ember); }
.stages li.now strong { color: var(--ember); }

/* leaderboard */
.board { width: 100%; border-collapse: collapse; margin-top: 34px; font-size: 1rem; }
.board th { text-align: left; font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--ink); }
.board td { padding: 12px; border-bottom: 1px solid rgba(21,41,45,.2); }
.board td.empty { padding: 26px 12px; font-style: italic; color: #3b5257; }

/* sign-up */
.updates form { margin-top: 30px; }
.updates label[for=email] { display: block; font-weight: 700; margin-bottom: 8px; }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input { flex: 1 1 260px; font: inherit; padding: 14px 16px; border-radius: 10px; border: 2px solid rgba(246,239,220,.35); background: rgba(246,239,220,.07); color: var(--foam); }
.field input::placeholder { color: rgba(246,239,220,.5); }
.field input:focus { border-color: var(--ember); outline: none; }
.field button { font: 700 1.05rem var(--body); background: var(--ember); color: #2a1503; border: 0; border-radius: 10px; padding: 14px 24px; cursor: pointer; }
.field button:disabled { opacity: .6; cursor: default; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: .98rem; opacity: .9; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ember); flex: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.status { min-height: 1.6em; margin-top: 14px; font-weight: 500; }
.status.ok { color: #b9e6a3; }
.status.bad { color: #ffc3a6; }

footer { background: #0a2e34; padding: 56px 0 64px; font-size: .95rem; color: rgba(246,239,220,.75); }
footer .mark { font-size: 1.8rem; color: var(--foam); margin-bottom: 10px; }
footer p { max-width: 70ch; }

/* phones and small windows */
@media (max-width: 860px) {
  .top nav { display: none; }
  .moment, .moment.flip { grid-template-columns: 1fr; margin-top: 52px; }
  .moment.flip img, .moment.flip .concept { order: 0; }
  .stages { grid-template-columns: 1fr; gap: 12px; }
  .hero { min-height: 88vh; }
  .hero-text { padding-top: 110px; padding-bottom: 96px; }
  .top .play.small { display: none; }
  .hero::after { background: linear-gradient(0deg, rgba(10,40,46,.92) 0%, rgba(10,40,46,.6) 55%, rgba(10,40,46,.15) 100%); }
  .board th:nth-child(4), .board td:nth-child(4) { display: none; }
}

/* beta tag, account button, notices */
.mark .beta { font: 700 .62rem/1 var(--body); letter-spacing: .04em; vertical-align: super; margin-left: 6px; padding: 3px 7px; border-radius: 999px; background: var(--ember); color: #2a1503; }
.top .account { background: none; border: 0; color: var(--foam); font: 500 1rem var(--body); cursor: pointer; padding: 8px 4px; opacity: .9; }
.top .account:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.notice { position: fixed; z-index: 20; left: 50%; top: 18px; transform: translateX(-50%); margin: 0; background: #f6efdc; color: var(--ink); padding: 12px 20px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-weight: 500; max-width: calc(100% - 32px); }
.board tr.me td { background: rgba(242,158,56,.22); font-weight: 700; }
.board tr.gap td { padding: 4px 12px; text-align: center; opacity: .5; }
.board td.num { font-variant-numeric: tabular-nums; }
.board-note { margin-top: 14px; font-size: .95rem; color: #3b5257; }

/* account dialog */
.acct { width: min(440px, calc(100% - 32px)); border: 0; border-radius: 14px; padding: 26px 26px 22px; background: var(--sand); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.acct::backdrop { background: rgba(8,30,34,.7); }
.acct h2 { font-size: 2rem; margin-bottom: 12px; }
.acct-close { position: absolute; right: 10px; top: 6px; }
.acct-close button { background: none; border: 0; font-size: 1.8rem; cursor: pointer; color: var(--ink); padding: 4px 10px; }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 2px solid rgba(21,41,45,.15); }
.tabs button { background: none; border: 0; font: 700 1rem var(--body); padding: 8px 10px 10px; color: #3b5257; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ember); }
.pane label { display: block; font-weight: 700; margin-bottom: 14px; }
.pane input:not(.trap) { display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; padding: 11px 13px; border-radius: 9px; border: 2px solid rgba(21,41,45,.25); background: #fbf5e6; color: var(--ink); }
.pane input:focus { border-color: var(--deep); outline: none; }
.pane small { display: block; font-weight: 400; color: #3b5257; margin-top: 5px; font-size: .88rem; }
.pane .go { width: 100%; font: 700 1.05rem var(--body); background: var(--deep); color: var(--foam); border: 0; border-radius: 10px; padding: 13px; cursor: pointer; margin-top: 4px; }
.pane .go:disabled { opacity: .6; }
.pane .link { background: none; border: 0; padding: 10px 0 0; color: var(--deep); font: 500 .95rem var(--body); text-decoration: underline; cursor: pointer; }
.pane .msg { min-height: 1.4em; margin: 12px 0 0; font-weight: 500; }
.pane .msg.bad { color: #9c2f12; }
.pane .msg.ok { color: #2f6b23; }
.pane .hint { margin-bottom: 16px; }
.pane[data-pane="me"] .play { margin-right: 16px; }
@media (max-width: 860px) { .top .account { margin-left: auto; } }

/* rank ladder */
.ladder-h { margin-top: 46px; font-size: 1.6rem; }
.ladder-sub { margin-top: 6px; color: #3b5257; }
.ladder { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.ladder li { display: grid; grid-template-columns: 1.8em 1fr auto; grid-template-areas: "n name pts" "n desc desc"; column-gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.28); }
.ladder .r-n { grid-area: n; color: #3b5257; font-variant-numeric: tabular-nums; }
.ladder strong { grid-area: name; font-weight: 700; }
.ladder .r-p { grid-area: pts; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .9rem; color: #3b5257; text-align: right; }
.ladder .r-d { grid-area: desc; font-size: .88rem; color: #3b5257; }
.ladder li.mine { background: rgba(242,158,56,.32); outline: 2px solid var(--ember); }
.ladder li.mine strong::after { content: "  (you)"; font-weight: 400; font-size: .85rem; }
@media (max-width: 640px) { .ladder { grid-template-columns: 1fr; } }

/* NovaCraft, the studio behind Isleborn */
.hero-text .by { margin: 0 0 14px; }
.hero-text .by a { display: inline-flex; align-items: center; gap: 8px; font: 700 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--foam); opacity: .85; text-decoration: none; }
.hero-text .by a:hover { opacity: 1; }
.hero-text .by img { height: 16px; width: auto; }
footer .studio { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 34px; border: 1px solid rgba(246,239,220,.18); border-radius: 12px; color: rgba(246,239,220,.85); text-decoration: none; max-width: 640px; }
footer .studio:hover { border-color: rgba(0,234,255,.55); }
footer .studio img { height: 32px; width: auto; flex: none; }
footer .studio strong { color: var(--foam); }
footer a { color: inherit; }

/* account: tick box, confirm reminder */
.pane label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.pane label.check input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--deep); padding: 0; }
.pane label.change { margin-top: 16px; font-weight: 500; font-size: .95rem; }
.pane[data-pane="confirm"] .play { display: inline-block; margin-top: 6px; }
.pane[data-pane="confirm"] .link { display: block; }
.acct .tabs[hidden] { display: none; }
.confirm-bar { position: fixed; z-index: 30; left: 50%; bottom: 18px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); background: var(--ember); color: #2a1503; text-align: center; padding: 10px 12px 10px 20px; border-radius: 99px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.confirm-bar[hidden] { display: none; }
@media (max-width: 640px) { .confirm-bar { border-radius: 14px; } .confirm-bar button { display: block; margin: 8px auto 0; } }
.confirm-bar button { font: 700 .95rem var(--body); background: #2a1503; color: var(--foam); border: 0; border-radius: 99px; padding: 5px 14px; margin-left: 10px; cursor: pointer; }

/* Founder's Pack */
.founder { background: linear-gradient(180deg, #123f47 0%, #0b2f35 100%); padding: 100px 0; }
.f-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.f-eyebrow { margin: 0 0 10px; font: 700 .78rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--ember); }
.f-list { margin: 22px 0 0; padding: 0; list-style: none; }
.f-list li { position: relative; padding: 0 0 12px 30px; }
.f-list li::before { content: "\2605"; position: absolute; left: 0; top: 0; color: #f2c14e; }
.f-fine { margin-top: 18px; font-size: .9rem; color: rgba(246,239,220,.7); }
.f-card { background: var(--sand); color: var(--ink); border-radius: 16px; padding: 30px 28px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.f-badge { display: inline-block; font: 700 .85rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; background: linear-gradient(180deg, #f7d26a, #d9a632); color: #3a2604; padding: 8px 14px; border-radius: 99px; }
.f-price { font: 400 3rem/1.1 var(--display); margin: 18px 0 18px; }
.f-left { margin: 12px 0 0; font: 700 .9rem/1.3 var(--body); color: #a4471c; letter-spacing: .02em; }
.f-price small { display: block; font: 500 .95rem var(--body); color: #3b5257; margin-top: 4px; }
.f-card .play { width: 100%; border: 0; cursor: pointer; font-family: var(--body); }
.f-card .play:disabled { opacity: .6; cursor: default; }
.f-status { min-height: 1.4em; margin: 12px 0 0; font-weight: 500; font-size: .95rem; }
.f-status.bad { color: #9c2f12; } .f-status.ok { color: #2f6b23; }
.f-wall { margin-top: 56px; border-top: 1px solid rgba(246,239,220,.18); padding-top: 26px; }
.f-wall h3 { font-size: 1.6rem; }
.f-names { margin: 12px 0 0; color: rgba(246,239,220,.85); line-height: 2; }
.f-names span { display: inline-block; margin: 0 16px 0 0; }
.f-names span::before { content: "\2605"; color: #f2c14e; margin-right: 6px; }
.fb { display: inline-block; margin-left: 8px; font: 700 .7rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; background: linear-gradient(180deg, #f7d26a, #d9a632); color: #3a2604; padding: 4px 7px; border-radius: 99px; vertical-align: 2px; }
@media (max-width: 800px) { .f-grid { grid-template-columns: 1fr; gap: 30px; } .founder { padding: 70px 0; } }

/* account settings */
.pane .settings-link { display: block; }
.settings details { border-top: 1px solid rgba(21,41,45,.18); padding: 4px 0; }
.settings details:last-of-type { border-bottom: 1px solid rgba(21,41,45,.18); }
.settings summary { cursor: pointer; font-weight: 700; padding: 12px 2px; list-style-position: inside; }
.settings form { padding: 4px 0 14px; }
.settings .danger summary { color: #9c2f12; }
.settings .danger .go { background: #9c2f12; }
.settings .hint { font-size: .95rem; }

/* the journey: seven screenshots from the beach to the frontier */
.journey { list-style: none; margin: 40px auto 0; padding: 0 16px; width: min(1320px, 100%); box-sizing: border-box; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.journey li { position: relative; }
.journey img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; box-shadow: 0 14px 30px -16px rgba(0,0,0,.6); }
.journey strong { display: block; font: 400 1.45rem/1.1 var(--display); margin: 12px 0 4px; }
.journey span { display: block; opacity: .8; font-size: .97rem; line-height: 1.4; }
.journey li:not(:last-child)::after { content: "\2192"; position: absolute; right: -12px; top: 38%; font-size: 18px; opacity: .55; }
@media (max-width: 1100px) { .journey { grid-template-columns: repeat(4, 1fr); } .journey li:nth-child(4)::after { display: none; } }
@media (max-width: 900px) { .journey { grid-template-columns: repeat(2, 1fr); } .journey li:last-child { grid-column: 1 / -1; } .journey li:last-child img { aspect-ratio: 16 / 9; } .journey li::after { display: none; } }

/* leaderboard: visit someone's island */
.board a.visit, table a.visit { margin-left: 8px; font-size: .78rem; font-weight: 700; color: var(--ember); text-decoration: none; border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; }
.board a.visit:hover, table a.visit:hover { background: var(--ember); color: #fff; }
