// Terms of use — long-form legal page in the Silver Editorial × La Villa system.
// Stresses throughout that the original library photographs can NEVER be used
// unchanged, by anyone, through Creative Studio (see §3 + §4).

function TermsHero() {
  return (
    <section className="ps-section" data-mobile-pad="true" data-mobile-y="md" style={{ background: 'var(--cream)', padding: '120px 48px 64px' }}>
      <div style={{ maxWidth: 920, margin: '0 auto' }}>
        <div className="eyebrow" style={{ marginBottom: 24 }}>
          <span style={{ display: 'inline-block', width: 24, height: 1, background: 'var(--cocoa)', verticalAlign: 'middle', marginRight: 12 }}></span>
          The fine print
        </div>
        <h1 className="celestial" style={{
          fontSize: 'clamp(72px,8vw,148px)', color: 'var(--cocoa)', margin: 0
        }}>
          Terms of use
        </h1>
        <p style={{
          fontFamily: '"La Villa", sans-serif', fontSize: 17, lineHeight: 1.55,
          color: 'var(--fg-2)', maxWidth: 640, margin: '36px 0 0'
        }}>
          By using Creative Studio, you agree to the following terms. If you do not agree, please do not use the service. These terms apply to all image and video generation features within Creative Studio.
        </p>
        <div style={{
          fontFamily: '"La Villa", sans-serif', fontSize: 11, letterSpacing: '0.22em',
          textTransform: 'uppercase', color: 'var(--fg-2)', marginTop: 36,
        }}>
          Last updated · April 2026
        </div>
      </div>
    </section>);
}


/* Reusable section block */
function TermsSection({ num, title, children, id }) {
  return (
    <section id={id} style={{
      borderTop: '1px solid var(--border-1)',
      padding: '56px 0',
    }}>
      <div className="ps-terms-grid" style={{ display: 'grid', gridTemplateColumns: '120px 1fr', gap: 48, alignItems: 'start' }}>
        <div className="ps-terms-num" style={{
          fontFamily: '"La Villa", sans-serif', fontSize: 11, letterSpacing: '0.22em',
          textTransform: 'uppercase', color: 'var(--fg-2)', paddingTop: 8,
        }}>
          §{String(num).padStart(2, '0')}
        </div>
        <div>
          <h2 className="celestial" style={{
            fontSize: 'clamp(28px,3vw,40px)', color: 'var(--cocoa)', margin: '0 0 24px',
            letterSpacing: '0.01em',
          }}>{title}</h2>
          <div style={{
            fontFamily: '"La Villa", sans-serif', fontSize: 15, lineHeight: 1.7,
            color: 'var(--fg-1)', maxWidth: 720,
          }}>
            {children}
          </div>
        </div>
      </div>
    </section>);
}

function P({ children, style }) {
  return <p style={{ margin: '0 0 16px', ...style }}>{children}</p>;
}

function L({ children }) {
  return (
    <ol style={{
      margin: '0 0 20px', paddingLeft: 0, listStyle: 'none',
      counterReset: 'tlist',
    }}>
      {React.Children.map(children, (c, i) => (
        <li key={i} style={{
          counterIncrement: 'tlist',
          paddingLeft: 36, position: 'relative', marginBottom: 10, lineHeight: 1.65,
        }}>
          <span style={{
            position: 'absolute', left: 0, top: 0,
            fontFamily: '"La Villa", sans-serif', fontSize: 11, letterSpacing: '0.18em',
            color: 'var(--fg-2)', fontVariantNumeric: 'tabular-nums',
          }}>{String(i + 1).padStart(2, '0')}</span>
          {c}
        </li>
      ))}
    </ol>);
}

function UL({ children }) {
  return (
    <ul style={{ margin: '0 0 20px', paddingLeft: 0, listStyle: 'none' }}>
      {React.Children.map(children, (c, i) => (
        <li key={i} style={{
          paddingLeft: 24, position: 'relative', marginBottom: 10, lineHeight: 1.65,
        }}>
          <span style={{
            position: 'absolute', left: 0, top: 10, width: 10, height: 1,
            background: 'var(--fg-2)',
          }}></span>
          {c}
        </li>
      ))}
    </ul>);
}

/* Pull-quote style emphasis block — used for the membership-required call-out */
function Emph({ children }) {
  return (
    <div style={{
      borderLeft: '2px solid var(--cocoa)',
      padding: '18px 0 18px 24px',
      margin: '20px 0 24px',
      fontFamily: '"La Villa", sans-serif', fontSize: 16, lineHeight: 1.55,
      color: 'var(--cocoa)',
    }}>
      {children}
    </div>);
}

function Mini({ children }) {
  return (
    <div style={{
      fontFamily: '"La Villa", sans-serif', fontSize: 11, letterSpacing: '0.22em',
      textTransform: 'uppercase', color: 'var(--fg-2)', marginTop: 22, marginBottom: 10,
    }}>{children}</div>);
}


function TermsBody() {
  return (
    <div className="ps-section" data-mobile-pad="true" style={{ background: 'var(--cream)', padding: '0 48px 80px' }}>
      <div style={{ maxWidth: 1080, margin: '0 auto' }}>

        <TermsSection num={1} title="The service" id="service">
          <P>Creative Studio is an AI-powered creative tool that allows you to generate images and videos by combining your own product photos with scenes from our image library, or scenes you describe in text. The service uses third-party AI models to produce these outputs. Results are generated algorithmically and may vary between runs.</P>
        </TermsSection>

        <TermsSection num={2} title="Your uploads" id="uploads">
          <P>You retain full ownership of any images you upload to Creative Studio (product photos, reference images, or any other files). By uploading content, you represent and warrant that:</P>
          <L>
            <span>You own the content or have obtained all necessary rights, licences, and permissions to use it.</span>
            <span>Your content does not infringe on the intellectual property rights, privacy rights, publicity rights, or any other rights of any third party.</span>
            <span>You have obtained consent from any identifiable individuals depicted in your uploads, and you are solely responsible for securing that consent.</span>
            <span>Any photograph of a person you supply as a model is of yourself, or of an adult who has given you express permission to use their likeness in AI-generated imagery.</span>
            <span>You will not supply a photograph of a minor, of a public figure or celebrity you have no agreement with, or of anyone who has asked you not to use their image.</span>
            <span>Your content complies with all applicable laws and regulations.</span>
          </L>
          <P>We do not review, verify, or pre-approve your uploads. You are solely responsible for ensuring you have the right to use any content you upload.</P>

          <Mini>Using a photograph of a person as a model</Mini>
          <P>Creative Studio lets you supply a photograph of a person, taken with your camera or uploaded from your device, and use it as the model in your generations. Before that image can be used, you must confirm that it is you, or a person who has given you permission to use their likeness. We record that confirmation together with the date, your account, and a digital fingerprint of the image, and we may retain that record for as long as is necessary to respond to a complaint or legal claim, including after you delete the image or close your account.</P>
          <P>Supplying a photograph of someone without their permission is a serious breach of these terms. It may also be unlawful where you live. We may remove the content, suspend or terminate your account, and where we are legally required to do so, provide the consent record and related account information to law enforcement or to a person bringing a claim.</P>
        </TermsSection>

        <TermsSection num={3} title={<>Library scenes</>} id="library">
          <P>The image library contains photographs and images that are owned or licensed by The Vault Stock Pty Ltd. When you select a library scene as a backdrop in Creative Studio, you are granted a limited, non-exclusive licence to use that scene <em style={{ fontFamily: '"Silver Editorial", serif', fontStyle: 'italic' }}>as part of the AI generation process</em>.</P>

          <Emph>
            The original library photographs are not licensed for use in their unchanged form, ever, by anyone. Your licence covers the AI-generated output only. They remain the copyrighted catalogue of The Vault Stock Pty Ltd.
          </Emph>

          <Mini>What this means</Mini>
          <P>You may use library scenes within Creative Studio to generate images and videos. You may use the resulting AI-generated outputs commercially, on social media, in advertising, e-commerce, marketing, print, and editorial.</P>
          <P>You may not extract, download, redistribute, resell, or sublicence the raw library scene images themselves outside of Creative Studio. The licence covers AI-generated outputs only, not the original unmodified source scenes. Creative Studio grants no rights to the underlying photographic catalogue, which is licensed separately and not through this service.</P>

          <Mini>Models in library photographs</Mini>
          <P>Some library photographs feature models who agreed to appear in our editorial library. When you build a Creative Studio image on top of one of those photographs, you will be required to select a different model from the Creative Studio model library before generating. The person in your final image will be the model you select, not the model from the original photograph. AI-generated scenes do not carry this requirement. This selection is part of how the library is licensed for use through Creative Studio.</P>
        </TermsSection>

        <TermsSection num={4} title="AI-generated outputs and liability" id="outputs">
          <P>You own the AI-generated images and videos that Creative Studio creates for you. You are free to use them commercially, editorially, or personally without additional fees beyond the credits used to generate them.</P>

          <Mini>Important — your outputs are your responsibility</Mini>
          <P>Once an image or video has been generated by AI, it is a new and distinct work. Even when a library scene is used as the backdrop, the AI-generated output is not a library image. It is your creation, produced using AI tools, and you bear full responsibility for how it is used.</P>
          <P>The licence to use library backdrops applies only to the transformed AI output. If a generation comes back substantially unchanged from the source scene, it is not covered by this licence and may not be used.</P>
          <P>This includes, without limitation:</P>
          <UL>
            <span>If you generate an image that includes a likeness of a real person (whether from your uploads, AI hallucination, or any other source), you are responsible for obtaining that person’s consent before using or publishing the image.</span>
            <span>If you use a generated image in a way that infringes on another party’s intellectual property, trademark, or publicity rights, that liability rests with you.</span>
            <span>If a generated output is used in a misleading, defamatory, or unlawful manner, you are solely responsible.</span>
          </UL>
          <P>The Vault Stock Pty Ltd is not responsible for the content, accuracy, legality, or appropriateness of any AI-generated output. We provide the tools. What you make with them is yours, and so is the responsibility that comes with it.</P>
        </TermsSection>

        <TermsSection num={5} title="Licence you grant to us" id="licence">
          <P>By using Creative Studio, you grant The Vault Stock Pty Ltd a non-exclusive, worldwide, royalty-free licence to use your uploads and AI-generated outputs for the following purposes:</P>
          <L>
            <span>To operate and provide the service (processing your images through AI models, storing your generation history, displaying results to you).</span>
            <span>To improve and develop our AI tools, models, and related technology.</span>
            <span>To use selected outputs in marketing, promotional, or educational materials for The Vault Stock and Creative Studio. If you do not want your outputs used for marketing, you may opt out by emailing <a href="mailto:studio@thevaultstock.com" style={{ color: 'var(--cocoa)', textDecoration: 'underline' }}>studio@thevaultstock.com</a>.</span>
          </L>
          <P>This licence does not transfer ownership of your content to us. You retain all rights to your uploads and outputs.</P>
        </TermsSection>

        <TermsSection num={6} title="Sound Studio and generated music" id="sound">
          <P>Sound Studio generates original music from a written brief. The tracks are produced by an AI model trained on licensed music rather than scraped music. The labels and publishers involved agreed to it, and the artists whose work it learned from are paid when their work features. The artists did not perform your track. Nothing generated here is a recording of a named artist, and it should never be described or credited as one.</P>
          <P>You may use the tracks you generate in your own content and campaigns, including social posts, advertising, websites, and video, on the same commercial terms as the images you generate. Each track is yours to download and keep.</P>
          <P>There are limits on redistribution, and they are passed down to us by the model provider rather than invented by us. You may not compile the tracks into a music library, catalogue, or repository and license, sell, or otherwise make them available to other people as music. You may not sell them as stock or production music, and you may not upload them to streaming or music distribution services, including Spotify and Apple Music. In short, the music is for use in your own work, not to be resold as music.</P>
          <P>Sound Studio uses credits based on the length of the track, because the underlying service charges us by duration. The length doubles, so the credits double: a 15 second track uses 100 credits, 30 seconds uses 200, and 60 seconds uses 400. The exact number is shown on the button before you generate, and it updates when you change the length. Credits are used when a track generates, including where you are not satisfied with the result. If a generation fails, the credits are returned to your balance automatically.</P>
          <P>Where you supply your own brief or your own words, you are responsible for what you submit, and the warranties in section 5 apply in full. We give no assurance that a track is free of third party rights, and we do not review results for similarity to existing works.</P>
        </TermsSection>

        <TermsSection num={7} title="Acceptable use" id="acceptable">
          <P>You agree not to use Creative Studio to generate, upload, or distribute content that:</P>
          <UL>
            <span>Is sexually explicit, pornographic, or obscene.</span>
            <span>Depicts, exploits, or endangers minors in any way.</span>
            <span>Creates non-consensual deepfakes or manipulated imagery of real, identifiable individuals.</span>
            <span>Is defamatory, threatening, harassing, or intended to intimidate.</span>
            <span>Infringes on the intellectual property, trademark, or publicity rights of others.</span>
            <span>Promotes violence, hatred, discrimination, or illegal activity.</span>
            <span>Is fraudulent, deceptive, or misleading (including creating fake endorsements, reviews, or testimonials).</span>
            <span>Violates any applicable local, state, national, or international law.</span>
          </UL>
          <P>We use automated content safety filters that may block certain generations. These filters are not perfect and do not replace your own judgement. You remain responsible for reviewing and approving any output before publishing or distributing it.</P>
        </TermsSection>

        <TermsSection num={8} title="Content moderation" id="moderation">
          <P>We reserve the right to review, remove, or restrict access to any content (uploads, outputs, or generation history) that we reasonably believe violates these terms. We may do so without prior notice. Repeated or serious violations may result in suspension or termination of your access to Creative Studio.</P>
        </TermsSection>

        <TermsSection num={9} title="Credits and billing" id="billing">
          <UL>
            <span>Credits are used to generate images and videos. Each generation uses a set number of credits depending on resolution, format, and tier.</span>
            <span>Purchased credit packs are non-refundable once bought. Purchased credits do not expire.</span>
            <span>Subscription credits are delivered monthly and added to your purchased balance. They do not expire.</span>
            <span>If a generation fails due to a technical error or content safety rejection, the credits for that generation are automatically refunded.</span>
            <span>We reserve the right to change credit pricing with reasonable notice. Existing purchased credits will not be devalued.</span>
          </UL>
        </TermsSection>

        <TermsSection num={10} title="No guarantees on output quality" id="quality">
          <P>AI generation is probabilistic. Results vary between runs, and we cannot guarantee that any specific generation will meet your expectations. Product type, scene selection, lighting, product photo quality, and creative direction all influence results. We recommend generating multiple variations and iterating.</P>
          <P>The service is provided on an “as is” and “as available” basis. We do not warrant that the service will be uninterrupted, error-free, or that results will be suitable for any particular purpose.</P>
          <P>This applies equally to Social Studio, our tool for creating ads and social posts. Its layouts, type, graphics, and imagery are produced by AI and will vary in quality, style, and accuracy from one generation to the next. We cannot guarantee that any Social Studio output will meet your expectations or be fit for a particular use. Credits are used each time a generation runs, including where you are not satisfied with a result.</P>
          <P>The same applies to Sound Studio, our music tool. Tracks are generated by AI from a written brief and will vary in style, arrangement, and quality from one cut to the next. We cannot guarantee that any track will meet your expectations or be fit for a particular use. Credits are used each time a track generates, including where you are not satisfied with the result, and the number used depends on the length you choose.</P>
          <P>The same applies to Bulk shoot, our tool for generating clothing campaigns at scale. The on-model images it produces are AI-generated and will vary in quality, fit, and accuracy from one image to the next, and we cannot guarantee any output will meet your expectations or be fit for a particular use. Credits are used per image as each one generates, including where you are not satisfied with a result. A bulk run processes in your browser, so keep the tab open until it finishes. If you close the tab, the images already generated are saved to your library, and the remaining ones are simply not generated and not charged.</P>
        </TermsSection>

        <TermsSection num={11} title="Limitation of liability" id="liability">
          <P>To the maximum extent permitted by law, The Vault Stock Pty Ltd and its directors, officers, employees, and agents shall not be liable for any indirect, incidental, special, consequential, or punitive damages arising from or related to your use of Creative Studio, including but not limited to loss of revenue, loss of profits, loss of data, or reputational harm.</P>
          <P>Our total cumulative liability to you for any and all claims arising from or related to Creative Studio shall not exceed the total amount you have paid to us for credits in the twelve (12) months immediately preceding the event giving rise to the claim, or AUD $100, whichever is greater.</P>
        </TermsSection>

        <TermsSection num={12} title="Indemnification" id="indemnify">
          <P>You agree to indemnify, defend, and hold harmless The Vault Stock Pty Ltd and its directors, officers, employees, and agents from and against any and all claims, losses, damages, liabilities, costs, and expenses (including reasonable legal fees) arising from or related to:</P>
          <UL>
            <span>Your uploads and any claims that they infringe the rights of a third party.</span>
            <span>Your AI-generated outputs and any claims arising from their use, publication, or distribution.</span>
            <span>Your use of library scenes outside the licensed AI generation flow.</span>
            <span>Your violation of these terms.</span>
            <span>Your violation of any applicable law or regulation.</span>
            <span>Any claim by a third party that content you generated or published using Creative Studio infringes their intellectual property, privacy, publicity, or other rights.</span>
            <span>Any claim brought by, or on behalf of, a person whose photograph or likeness you supplied to Creative Studio.</span>
          </UL>
        </TermsSection>

        <TermsSection num={13} title="Termination" id="termination">
          <P>We may suspend or terminate your access to Creative Studio at any time, with or without notice, if we reasonably believe you have violated these terms. Upon termination, your right to use the service ceases immediately. Any unused purchased credits will be forfeited unless required otherwise by applicable consumer protection law.</P>
          <P>You may stop using Creative Studio at any time. Cancellation of a subscription stops future credit deliveries but does not entitle you to a refund of the current billing period.</P>
        </TermsSection>

        <TermsSection num={14} title="Changes to these terms" id="changes">
          <P>We may update these terms from time to time. If we make material changes, we will notify you through the service or by email. Your continued use of Creative Studio after changes take effect constitutes acceptance of the updated terms.</P>
        </TermsSection>

        <TermsSection num={15} title="Reporting misuse" id="report">
          <P>If you believe an image of you, or of someone you are responsible for, has been used in Creative Studio without permission, contact us at info@thevaultstock.com with any detail that helps us identify the content. You do not need an account to make a report. We will investigate, and where a report is substantiated we will remove the content and take action on the account responsible. The same address can be used to report any other breach of these terms.</P>
        </TermsSection>

        <TermsSection num={16} title="Governing law" id="law">
          <P>These terms are governed by and construed in accordance with the laws of the State of Queensland, Australia. Any disputes arising from these terms or your use of Creative Studio shall be subject to the exclusive jurisdiction of the courts of Queensland, Australia.</P>
        </TermsSection>

      </div>
    </div>);
}


function TermsCTA() {
  return (
    <section className="ps-section" data-mobile-pad="true" data-mobile-y="lg" style={{
      background: 'var(--cream-deep)', padding: '96px 48px',
      borderTop: '1px solid var(--border-1)',
    }}>
      <div style={{ maxWidth: 920, margin: '0 auto', textAlign: 'center' }}>
        <h2 className="celestial" style={{
          fontSize: 'clamp(40px,5vw,72px)', color: 'var(--cocoa)', margin: 0
        }}>Questions?</h2>
        <p style={{
          fontFamily: '"La Villa", sans-serif', fontSize: 16, lineHeight: 1.6, color: 'var(--fg-2)',
          maxWidth: 540, margin: '20px auto 32px',
        }}>
          If anything in these terms is unclear, contact us at <a href="mailto:studio@thevaultstock.com" style={{ color: 'var(--cocoa)', textDecoration: 'underline' }}>studio@thevaultstock.com</a>.
        </p>
        <div style={{
          fontFamily: '"La Villa", sans-serif', fontSize: 11, letterSpacing: '0.22em',
          textTransform: 'uppercase', color: 'var(--fg-2)',
        }}>
          The Vault Stock Pty Ltd · ABN pending
        </div>
      </div>
    </section>);
}

Object.assign(window, { TermsHero, TermsBody, TermsCTA });
